@mx-cartographer/experiences 9.7.103 → 9.7.105

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -1,3 +1,11 @@
1
+ ## [9.7.105] - 11-04-2026
2
+
3
+ - **REMOVED** - Unused dead code from the account filter utilities (MEW-4188)
4
+
5
+ ## [9.7.104] - 11-04-2026
6
+
7
+ - **ADDED** - `weekly_small_purchases_block` for the Weekly Small Purchases Summary beat on Insights 2.0 (MEW2-3412): the total and up to 6 merchant logo tiles, the last one a "+N" when there are more
8
+
1
9
  ## [9.7.103] - 11-04-2026
2
10
 
3
11
  - **ADDED** - `savings_summary_block` for the Save Enough to Live On beat on Insights 2.0 (MEW2-3410)
@@ -1,18 +1,4 @@
1
- import { GlobalStore } from '../../core/stores/GlobalStore';
2
1
  import { Account } from '../../core';
3
- export interface MappedAccounts {
4
- [key: string]: MappedAccount[];
5
- }
6
- export interface MappedAccount {
7
- accountNumber: string;
8
- name: string;
9
- guid: string;
10
- }
11
- export interface MappedOptions {
12
- [key: string]: boolean;
13
- }
14
- export declare const setupMappedSelectedOptions: (accounts: Account[], selectedAccountGuids: string[]) => MappedOptions;
15
- export declare const setupMappedAccounts: (accounts: Account[], closeContentCopy: string, globalStore?: GlobalStore) => MappedAccounts;
16
2
  export declare function categorizeAccounts(accounts: Account[]): {
17
3
  heldAccounts: Account[];
18
4
  externalAccounts: Account[];
@@ -1 +1 @@
1
- {"version":3,"file":"AccountFilter.es.js","names":[],"sources":["../../../src/common/utils/AccountFilter.ts"],"sourcesContent":["import getAccountDisplayName from './AccountDisplayName'\nimport { GlobalStore } from '../../core/stores/GlobalStore'\n\nimport type { Account } from '../../core'\nimport { AccountType, AccountTypeName } from '../../core'\n\nexport interface MappedAccounts {\n [key: string]: MappedAccount[]\n}\n\nexport interface MappedAccount {\n accountNumber: string\n name: string\n guid: string\n}\n\nexport interface MappedOptions {\n [key: string]: boolean\n}\n\n// Sets up the collection of selected account guids into a mapped object\nexport const setupMappedSelectedOptions = (accounts: Account[], selectedAccountGuids: string[]) => {\n return accounts.reduce((accumulator: MappedOptions, account) => {\n accumulator[account.guid] = selectedAccountGuids?.includes(account.guid)\n return accumulator\n }, {})\n}\n\n// Creates a mapped collection of accounts that are grouped together by the account type\nexport const setupMappedAccounts = (\n accounts: Account[],\n closeContentCopy: string,\n globalStore?: GlobalStore,\n) => {\n return accounts.reduce((accumulator: MappedAccounts, account) => {\n const accountType = AccountTypeName[account.account_type]\n const displayName = getAccountDisplayName(account, {\n allowNickname: globalStore?.appConfig.config?.show_account_nicknames_in_master,\n })\n const newAccount = {\n accountNumber: account.account_number,\n name: `${displayName} ${account.is_closed ? `(${closeContentCopy})` : ''}`,\n guid: account.guid,\n } as MappedAccount\n\n if (Object.prototype.hasOwnProperty.call(accumulator, accountType)) {\n accumulator[accountType] = accumulator[accountType].concat(newAccount)\n } else {\n accumulator[accountType] = [newAccount]\n }\n\n return accumulator\n }, {})\n}\n\nexport function categorizeAccounts(accounts: Account[]): {\n heldAccounts: Account[]\n externalAccounts: Account[]\n} {\n const { heldAccounts, externalAccounts } = accounts.reduce(\n (acc, account) => {\n if (account.member_is_managed_by_user) acc.externalAccounts.push(account)\n else acc.heldAccounts.push(account)\n return acc\n },\n { heldAccounts: [] as Account[], externalAccounts: [] as Account[] },\n )\n\n return {\n heldAccounts: sortByTypePriority(heldAccounts),\n externalAccounts: sortByTypePriority(externalAccounts),\n }\n}\n\nexport function getDisplayAccounts(accounts: Account[], maxAccounts: number): Account[] {\n const { heldAccounts, externalAccounts } = categorizeAccounts(accounts)\n\n const result = heldAccounts.slice(0, maxAccounts)\n\n if (result.length < maxAccounts) {\n result.push(...externalAccounts.slice(0, maxAccounts - result.length))\n }\n\n return result\n}\n\nconst priorityMap: { [key in AccountType]?: number } = {\n [AccountType.CHECKING]: 1,\n [AccountType.SAVINGS]: 2,\n [AccountType.CREDIT_CARD]: 3,\n}\n\nconst getPriority = (accountType: AccountType) => {\n return priorityMap[accountType] ?? accountType + 100\n}\n\nconst sortByTypePriority = (list: Account[]) => {\n return list.sort((a, b) => {\n const aPriority = getPriority(a.account_type)\n const bPriority = getPriority(b.account_type)\n const priorityDiff = aPriority - bPriority\n\n if (priorityDiff !== 0) return priorityDiff\n\n const aName = a.name ?? a.feed_name ?? ''\n const bName = b.name ?? b.feed_name ?? ''\n return aName.localeCompare(bName)\n })\n}\n"],"mappings":";AAuDA,SAAgB,EAAmB,GAGjC;AACA,QAAM,EAAE,cAAA,GAAc,kBAAA,EAAA,IAAqB,EAAS,OAAA,CACjD,GAAK,OACA,EAAQ,4BAA2B,EAAI,iBAAiB,KAAK,CAAO,IACnE,EAAI,aAAa,KAAK,CAAO,GAC3B,IAET;AAAA,IAAE,cAAc,CAAC;AAAA,IAAgB,kBAAkB,CAAC;AAAA,EAAe,CACrE;AAEA,SAAO;AAAA,IACL,cAAc,EAAmB,CAAY;AAAA,IAC7C,kBAAkB,EAAmB,CAAgB;AAAA,EACvD;AACF;AAEA,SAAgB,EAAmB,GAAqB,GAAgC;AACtF,QAAM,EAAE,cAAA,GAAc,kBAAA,EAAA,IAAqB,EAAmB,CAAQ,GAEhE,IAAS,EAAa,MAAM,GAAG,CAAW;AAEhD,SAAI,EAAO,SAAS,KAClB,EAAO,KAAK,GAAG,EAAiB,MAAM,GAAG,IAAc,EAAO,MAAM,CAAC,GAGhE;AACT;AAEA,IAAM,IAAiD;AAAA,EACpD,CAAA,EAAY,QAAA,GAAW;AAAA,EACvB,CAAA,EAAY,OAAA,GAAU;AAAA,EACtB,CAAA,EAAY,WAAA,GAAc;AAC7B,GAEM,IAAA,CAAe,MACZ,EAAY,CAAA,KAAgB,IAAc,KAG7C,IAAA,CAAsB,MACnB,EAAK,KAAA,CAAM,GAAG,MAAM;AAGzB,QAAM,IAFY,EAAY,EAAE,YAEX,IADH,EAAY,EAAE,YACC;AAEjC,MAAI,MAAiB,EAAG,QAAO;AAE/B,QAAM,IAAQ,EAAE,QAAQ,EAAE,aAAa,IACjC,IAAQ,EAAE,QAAQ,EAAE,aAAa;AACvC,SAAO,EAAM,cAAc,CAAK;AAClC,CAAC"}
1
+ {"version":3,"file":"AccountFilter.es.js","names":[],"sources":["../../../src/common/utils/AccountFilter.ts"],"sourcesContent":["import type { Account } from '../../core'\nimport { AccountType } from '../../core'\n\nexport function categorizeAccounts(accounts: Account[]): {\n heldAccounts: Account[]\n externalAccounts: Account[]\n} {\n const { heldAccounts, externalAccounts } = accounts.reduce(\n (acc, account) => {\n if (account.member_is_managed_by_user) acc.externalAccounts.push(account)\n else acc.heldAccounts.push(account)\n return acc\n },\n { heldAccounts: [] as Account[], externalAccounts: [] as Account[] },\n )\n\n return {\n heldAccounts: sortByTypePriority(heldAccounts),\n externalAccounts: sortByTypePriority(externalAccounts),\n }\n}\n\nexport function getDisplayAccounts(accounts: Account[], maxAccounts: number): Account[] {\n const { heldAccounts, externalAccounts } = categorizeAccounts(accounts)\n\n const result = heldAccounts.slice(0, maxAccounts)\n\n if (result.length < maxAccounts) {\n result.push(...externalAccounts.slice(0, maxAccounts - result.length))\n }\n\n return result\n}\n\nconst priorityMap: { [key in AccountType]?: number } = {\n [AccountType.CHECKING]: 1,\n [AccountType.SAVINGS]: 2,\n [AccountType.CREDIT_CARD]: 3,\n}\n\nconst getPriority = (accountType: AccountType) => {\n return priorityMap[accountType] ?? accountType + 100\n}\n\nconst sortByTypePriority = (list: Account[]) => {\n return list.sort((a, b) => {\n const aPriority = getPriority(a.account_type)\n const bPriority = getPriority(b.account_type)\n const priorityDiff = aPriority - bPriority\n\n if (priorityDiff !== 0) return priorityDiff\n\n const aName = a.name ?? a.feed_name ?? ''\n const bName = b.name ?? b.feed_name ?? ''\n return aName.localeCompare(bName)\n })\n}\n"],"mappings":";AAGA,SAAgB,EAAmB,GAGjC;AACA,QAAM,EAAE,cAAA,GAAc,kBAAA,EAAA,IAAqB,EAAS,OAAA,CACjD,GAAK,OACA,EAAQ,4BAA2B,EAAI,iBAAiB,KAAK,CAAO,IACnE,EAAI,aAAa,KAAK,CAAO,GAC3B,IAET;AAAA,IAAE,cAAc,CAAC;AAAA,IAAgB,kBAAkB,CAAC;AAAA,EAAe,CACrE;AAEA,SAAO;AAAA,IACL,cAAc,EAAmB,CAAY;AAAA,IAC7C,kBAAkB,EAAmB,CAAgB;AAAA,EACvD;AACF;AAEA,SAAgB,EAAmB,GAAqB,GAAgC;AACtF,QAAM,EAAE,cAAA,GAAc,kBAAA,EAAA,IAAqB,EAAmB,CAAQ,GAEhE,IAAS,EAAa,MAAM,GAAG,CAAW;AAEhD,SAAI,EAAO,SAAS,KAClB,EAAO,KAAK,GAAG,EAAiB,MAAM,GAAG,IAAc,EAAO,MAAM,CAAC,GAGhE;AACT;AAEA,IAAM,IAAiD;AAAA,EACpD,CAAA,EAAY,QAAA,GAAW;AAAA,EACvB,CAAA,EAAY,OAAA,GAAU;AAAA,EACtB,CAAA,EAAY,WAAA,GAAc;AAC7B,GAEM,IAAA,CAAe,MACZ,EAAY,CAAA,KAAgB,IAAc,KAG7C,IAAA,CAAsB,MACnB,EAAK,KAAA,CAAM,GAAG,MAAM;AAGzB,QAAM,IAFY,EAAY,EAAE,YAEX,IADH,EAAY,EAAE,YACC;AAEjC,MAAI,MAAiB,EAAG,QAAO;AAE/B,QAAM,IAAQ,EAAE,QAAQ,EAAE,aAAa,IACjC,IAAQ,EAAE,QAAQ,EAAE,aAAa;AACvC,SAAO,EAAM,cAAc,CAAK;AAClC,CAAC"}
@@ -276,6 +276,7 @@ export declare const BlockType: {
276
276
  readonly SVGImageBlock: "svg_image_block";
277
277
  readonly UpcomingBillBlock: "upcoming_bill_block";
278
278
  readonly UpcomingSubscriptionBlock: "upcoming_subscription_block";
279
+ readonly WeeklySmallPurchasesBlock: "weekly_small_purchases_block";
279
280
  readonly WithdrawalBlock: "withdrawal_block";
280
281
  };
281
282
  export type BlockType = (typeof BlockType)[keyof typeof BlockType];
@@ -380,4 +381,6 @@ export interface InstanceSlot {
380
381
  avg_monthly_spend?: number;
381
382
  /** How long the balance lasts, e.g. "2 months, 11 days". */
382
383
  time_period?: string;
384
+ /** One row per unique merchant in the period, in the order sent. */
385
+ data_series?: InstanceSlotRow[];
383
386
  }
@@ -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. On the payload: what every CTA of the card\n * shares (e.g. the account number for the Transaction Details drawer, or the guid list a list drawer\n * shows, `transaction_guids`). On a CTA: the figures that CTA's own drilldown renders (the Transaction\n * List summary header's `amount`, `start_date` / `end_date` and `count`, see `readSummary`). Scalars\n * or string lists, omitted when the insight has none. Never carries copy or user actions (memo,\n * tags, hide, flag come from the transaction store). Values come from the server, so a reader still\n * 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 /** Figures this CTA's drilldown renders (e.g. a summary header's amount/dates/count). */\n drilldown_data?: DrilldownData\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 /** Figures this CTA's drilldown renders (e.g. a summary header's amount/dates/count). */\n drilldown_data?: DrilldownData\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 /** tupac's flat host message for the link (`action` plus fields), e.g. Switch's op_1. */\n post_message_metadata?: ({ action?: string | null } & Record<string, unknown>) | null\n /** Figures this CTA's drilldown renders (e.g. a summary header's amount/dates/count). */\n drilldown_data?: DrilldownData\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 MerchantBlock: 'merchant_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 GasPurchaseBlock: 'gas_purchase_block',\n GoalsBlock: 'goals_block',\n NoSpendDaysBlock: 'no_spend_days_block',\n RepeatingTransactionBlock: 'repeating_transaction_block',\n SaveExtraBlock: 'save_extra_block',\n SavingsAmountBlock: 'savings_amount_block',\n SavingsSummaryBlock: 'savings_summary_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), UpcomingSubscriptionBlock (price per cadence).\n // (SavingsOpportunityBlock now reads `amount` off `instance_slot.data`, not this flat field.)\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 // Account block (confetti tile): V1 flat fallback for the label line when `instance_slot.data` is\n // absent — `AccountBlock` reads `data.sub_text` first, then this. (The Savings Opportunity coupon\n // now reads `primary_text`/`amount` off `data`, so it no longer reads this flat field.)\n /** Caption/label line for the confetti tile (V1 fallback). */\n label?: string\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 /** First day of the month a monthly summary covers, in ISO form (e.g. `2026-09-01`). */\n date?: string\n /** Number of gas station visits in the month. */\n total_fill_up_visits?: number\n /** Amount spent at gas stations in the month, unformatted. */\n total_spend?: number\n /** V1 name for `total_spend`, read when `total_spend` is absent. */\n total_debt_for_fill_up_visits_in_prev_month?: number\n /** Total available balance across the user's accounts, unformatted. */\n available_balance?: number\n /** Average monthly spend, unformatted. */\n avg_monthly_spend?: number\n /** How long the balance lasts, e.g. \"2 months, 11 days\". */\n time_period?: string\n}\n"],"mappings":"AA6UA,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. On the payload: what every CTA of the card\n * shares (e.g. the account number for the Transaction Details drawer, or the guid list a list drawer\n * shows, `transaction_guids`). On a CTA: the figures that CTA's own drilldown renders (the Transaction\n * List summary header's `amount`, `start_date` / `end_date` and `count`, see `readSummary`). Scalars\n * or string lists, omitted when the insight has none. Never carries copy or user actions (memo,\n * tags, hide, flag come from the transaction store). Values come from the server, so a reader still\n * 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 /** Figures this CTA's drilldown renders (e.g. a summary header's amount/dates/count). */\n drilldown_data?: DrilldownData\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 /** Figures this CTA's drilldown renders (e.g. a summary header's amount/dates/count). */\n drilldown_data?: DrilldownData\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 /** tupac's flat host message for the link (`action` plus fields), e.g. Switch's op_1. */\n post_message_metadata?: ({ action?: string | null } & Record<string, unknown>) | null\n /** Figures this CTA's drilldown renders (e.g. a summary header's amount/dates/count). */\n drilldown_data?: DrilldownData\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 MerchantBlock: 'merchant_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 GasPurchaseBlock: 'gas_purchase_block',\n GoalsBlock: 'goals_block',\n NoSpendDaysBlock: 'no_spend_days_block',\n RepeatingTransactionBlock: 'repeating_transaction_block',\n SaveExtraBlock: 'save_extra_block',\n SavingsAmountBlock: 'savings_amount_block',\n SavingsSummaryBlock: 'savings_summary_block',\n StepChartBlock: 'step_chart_block',\n SVGImageBlock: 'svg_image_block',\n UpcomingBillBlock: 'upcoming_bill_block',\n UpcomingSubscriptionBlock: 'upcoming_subscription_block',\n WeeklySmallPurchasesBlock: 'weekly_small_purchases_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), UpcomingSubscriptionBlock (price per cadence).\n // (SavingsOpportunityBlock now reads `amount` off `instance_slot.data`, not this flat field.)\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 // Account block (confetti tile): V1 flat fallback for the label line when `instance_slot.data` is\n // absent — `AccountBlock` reads `data.sub_text` first, then this. (The Savings Opportunity coupon\n // now reads `primary_text`/`amount` off `data`, so it no longer reads this flat field.)\n /** Caption/label line for the confetti tile (V1 fallback). */\n label?: string\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 /** First day of the month a monthly summary covers, in ISO form (e.g. `2026-09-01`). */\n date?: string\n /** Number of gas station visits in the month. */\n total_fill_up_visits?: number\n /** Amount spent at gas stations in the month, unformatted. */\n total_spend?: number\n /** V1 name for `total_spend`, read when `total_spend` is absent. */\n total_debt_for_fill_up_visits_in_prev_month?: number\n /** Total available balance across the user's accounts, unformatted. */\n available_balance?: number\n /** Average monthly spend, unformatted. */\n avg_monthly_spend?: number\n /** How long the balance lasts, e.g. \"2 months, 11 days\". */\n time_period?: string\n /** One row per unique merchant in the period, in the order sent. */\n data_series?: InstanceSlotRow[]\n}\n"],"mappings":"AA8UA,IAAa,IAAA,CACX,GACA,MACkB,IAAO,CAAA"}
@@ -37,6 +37,10 @@ interface GeneralInsightsFeedCopy {
37
37
  gas_fill_ups_count_one?: string;
38
38
  gas_pump?: string;
39
39
  gas_spent_on_gas?: string;
40
+ /** `_1{count}` — accessible name of the "+N" chip, e.g. "3 more merchants". */
41
+ more_merchants?: string;
42
+ no_small_purchases_found?: string;
43
+ total?: string;
40
44
  /** `_1{institution}` — the alt text of an institution's logo, e.g. "Chase Institution Logo". */
41
45
  institution_Logo?: string;
42
46
  weekly_no_spending_component_alt_text?: DynamicKeyValue;
@@ -0,0 +1,3 @@
1
+ import { BlockProps } from '../../types';
2
+ declare const WeeklySmallPurchasesBlock: ({ payload }: BlockProps) => import("react/jsx-runtime").JSX.Element | null;
3
+ export default WeeklySmallPurchasesBlock;
@@ -0,0 +1,105 @@
1
+ import { buildDynamicCopy as x } from "../../../../core/utils/Localization.es.js";
2
+ import { useGlobalCopyStore as y } from "../../../../common/context/hooks.es.js";
3
+ import { slot as w } from "../../../../core/types/Insights.es.js";
4
+ import { formatCurrency as C } from "../../../../core/utils/NumberFormatting.es.js";
5
+ import _, { isLogoGuid as L } from "../../../components/LogoFromGuid.es.js";
6
+ import g from "../../../components/LogoTile.es.js";
7
+ import n from "@mui/material/Stack";
8
+ import { Text as l } from "@mxenabled/mxui";
9
+ import { Icon as R } from "@mxenabled/mx-icons";
10
+ import { jsx as o, jsxs as a } from "react/jsx-runtime";
11
+ var b = 6, m = 32, S = (r) => typeof r == "object" && r !== null, G = ({ row: r }) => {
12
+ if (L(r.logo?.guid)) return /* @__PURE__ */ o(_, {
13
+ logo: r.logo,
14
+ size: m
15
+ });
16
+ const e = r.logo?.alt;
17
+ return /* @__PURE__ */ o(R, {
18
+ "aria-hidden": e ? void 0 : !0,
19
+ "aria-label": e,
20
+ "data-icon": "storefront",
21
+ name: "storefront",
22
+ role: e ? "img" : void 0,
23
+ size: 20,
24
+ sx: { color: "text.secondary" }
25
+ });
26
+ }, B = ({ payload: r }) => {
27
+ const e = y().insights_feed?.general, { instance_slot: p = {} } = r, u = (i) => w(p.data, i) ?? p[i], s = u("amount");
28
+ if (typeof s != "number" || !Number.isFinite(s)) return null;
29
+ const h = u("data_series"), t = (Array.isArray(h) ? h : []).filter(S), f = t.length > b ? t.slice(0, 5) : t, d = t.length - f.length, c = x(e?.more_merchants ?? "", `${d}`) || void 0;
30
+ return /* @__PURE__ */ o(n, {
31
+ sx: {
32
+ px: 16,
33
+ width: "100%"
34
+ },
35
+ children: /* @__PURE__ */ a(n, {
36
+ sx: {
37
+ border: 1,
38
+ borderColor: "divider",
39
+ borderRadius: "8px",
40
+ gap: 12,
41
+ pb: 16,
42
+ pt: 12,
43
+ px: 16
44
+ },
45
+ children: [/* @__PURE__ */ a(n, {
46
+ direction: "row",
47
+ sx: {
48
+ alignItems: "baseline",
49
+ gap: 6
50
+ },
51
+ children: [/* @__PURE__ */ o(l, {
52
+ component: "p",
53
+ variant: "h2",
54
+ children: C(s, "0,0.00")
55
+ }), /* @__PURE__ */ o(l, {
56
+ color: "text.secondary",
57
+ variant: "caption",
58
+ children: e?.total
59
+ })]
60
+ }), t.length ? /* @__PURE__ */ a(n, {
61
+ component: "ul",
62
+ direction: "row",
63
+ sx: {
64
+ flexWrap: "wrap",
65
+ gap: 8,
66
+ justifyContent: t.length >= b ? "space-between" : "flex-start",
67
+ listStyle: "none",
68
+ m: 0,
69
+ p: 0
70
+ },
71
+ children: [f.map((i, v) => /* @__PURE__ */ o("li", { children: /* @__PURE__ */ o(g, {
72
+ borderColor: "divider",
73
+ borderRadius: 4,
74
+ size: m,
75
+ children: /* @__PURE__ */ o(G, { row: i })
76
+ }) }, v)), d > 0 && /* @__PURE__ */ o("li", { children: /* @__PURE__ */ o(g, {
77
+ bgcolor: "action.hover",
78
+ borderColor: null,
79
+ borderRadius: 4,
80
+ size: m,
81
+ children: /* @__PURE__ */ o(l, {
82
+ "aria-label": c,
83
+ bold: !0,
84
+ color: "text.secondary",
85
+ role: c ? "img" : void 0,
86
+ variant: "body2",
87
+ children: /* @__PURE__ */ a("span", {
88
+ "aria-hidden": c ? !0 : void 0,
89
+ children: ["+", d]
90
+ })
91
+ })
92
+ }) })]
93
+ }) : /* @__PURE__ */ o(l, {
94
+ color: "text.secondary",
95
+ variant: "body2",
96
+ children: e?.no_small_purchases_found
97
+ })]
98
+ })
99
+ });
100
+ };
101
+ export {
102
+ B as default
103
+ };
104
+
105
+ //# sourceMappingURL=WeeklySmallPurchasesBlock.es.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"WeeklySmallPurchasesBlock.es.js","names":[],"sources":["../../../../../src/insights-v2/blocks/ComponentBlocks/WeeklySmallPurchasesBlock/WeeklySmallPurchasesBlock.tsx"],"sourcesContent":["import Stack from '@mui/material/Stack'\n\nimport { Text } from '@mxenabled/mxui'\nimport { Icon } from '@mxenabled/mx-icons'\n\nimport { useGlobalCopyStore } from '../../../../common'\nimport { slot, type InstanceSlot, type InstanceSlotRow } from '../../../../core'\nimport { buildDynamicCopy } from '../../../../core/utils/Localization'\nimport { formatCurrency } from '../../../../core/utils/NumberFormatting'\nimport LogoFromGuid, { isLogoGuid } from '../../../components/LogoFromGuid'\nimport LogoTile from '../../../components/LogoTile'\nimport type { BlockProps } from '../../types'\n\ntype WeeklySmallPurchasesSlot = Pick<InstanceSlot, 'amount' | 'data_series'>\n\nconst MAX_LOGOS = 6\nconst LOGO_SIZE = 32\n\nconst isRow = (row: unknown): row is InstanceSlotRow => typeof row === 'object' && row !== null\n\nconst RowLogo = ({ row }: { row: InstanceSlotRow }) => {\n if (isLogoGuid(row.logo?.guid)) return <LogoFromGuid logo={row.logo} size={LOGO_SIZE} />\n\n const alt = row.logo?.alt\n return (\n <Icon\n aria-hidden={alt ? undefined : true}\n aria-label={alt}\n data-icon=\"storefront\"\n name=\"storefront\"\n role={alt ? 'img' : undefined}\n size={20}\n sx={{ color: 'text.secondary' }}\n />\n )\n}\n\nconst WeeklySmallPurchasesBlock = ({ payload }: BlockProps) => {\n const generalCopy = useGlobalCopyStore().insights_feed?.general\n\n const { instance_slot = {} } = payload\n const field = <K extends keyof WeeklySmallPurchasesSlot>(key: K) =>\n slot<InstanceSlot[K]>(instance_slot.data, key) ?? instance_slot[key]\n\n const amount = field('amount')\n if (typeof amount !== 'number' || !Number.isFinite(amount)) return null\n\n const rawRows = field('data_series')\n const rows = (Array.isArray(rawRows) ? rawRows : []).filter(isRow)\n // Past 6, the last tile becomes \"+N\" so the row stays at 6 tiles like Figma.\n const visibleRows = rows.length > MAX_LOGOS ? rows.slice(0, MAX_LOGOS - 1) : rows\n const overflowCount = rows.length - visibleRows.length\n const moreLabel =\n (buildDynamicCopy(generalCopy?.more_merchants ?? '', `${overflowCount}`) as string) || undefined\n\n return (\n <Stack sx={{ px: 16, width: '100%' }}>\n <Stack\n sx={{\n border: 1,\n borderColor: 'divider',\n borderRadius: '8px',\n gap: 12,\n pb: 16,\n pt: 12,\n px: 16,\n }}\n >\n <Stack direction=\"row\" sx={{ alignItems: 'baseline', gap: 6 }}>\n <Text component=\"p\" variant=\"h2\">\n {formatCurrency(amount, '0,0.00')}\n </Text>\n <Text color=\"text.secondary\" variant=\"caption\">\n {generalCopy?.total}\n </Text>\n </Stack>\n {rows.length ? (\n <Stack\n component=\"ul\"\n direction=\"row\"\n sx={{\n flexWrap: 'wrap',\n gap: 8,\n justifyContent: rows.length >= MAX_LOGOS ? 'space-between' : 'flex-start',\n listStyle: 'none',\n m: 0,\n p: 0,\n }}\n >\n {visibleRows.map((row, index) => (\n // eslint-disable-next-line react/no-array-index-key\n <li key={index}>\n <LogoTile borderColor=\"divider\" borderRadius={4} size={LOGO_SIZE}>\n <RowLogo row={row} />\n </LogoTile>\n </li>\n ))}\n {overflowCount > 0 && (\n <li>\n <LogoTile\n bgcolor=\"action.hover\"\n borderColor={null}\n borderRadius={4}\n size={LOGO_SIZE}\n >\n <Text\n aria-label={moreLabel}\n bold={true}\n color=\"text.secondary\"\n role={moreLabel ? 'img' : undefined}\n variant=\"body2\"\n >\n <span aria-hidden={moreLabel ? true : undefined}>+{overflowCount}</span>\n </Text>\n </LogoTile>\n </li>\n )}\n </Stack>\n ) : (\n <Text color=\"text.secondary\" variant=\"body2\">\n {generalCopy?.no_small_purchases_found}\n </Text>\n )}\n </Stack>\n </Stack>\n )\n}\n\nexport default WeeklySmallPurchasesBlock\n"],"mappings":";;;;;;;;;;AAeA,IAAM,IAAY,GACZ,IAAY,IAEZ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YAER,UAAA,gBAAA,EAAC,QAAD;AAAA,cAAM,eAAa,IAAY,KAAO;AAAA,cAAtC,UAAA,CAAiD,KAAE,CAAoB;AAAA;UACnE,CAAA;AAAA,QACE,CAAA,EACR,CAAA,CAED;AAAA,MAEP,CAAA,IAAA,gBAAA,EAAC,GAAD;AAAA,QAAM,OAAM;AAAA,QAAiB,SAAQ;AAAA,QAClC,UAAA,GAAa;AAAA,MACV,CAAA,CAEH;AAAA;EACF,CAAA;AAEX"}
@@ -0,0 +1 @@
1
+ export { default as WeeklySmallPurchasesBlock } from './WeeklySmallPurchasesBlock';
@@ -13,4 +13,5 @@ export * from './SavingsOpportunityBlock';
13
13
  export * from './SavingsSummaryBlock';
14
14
  export * from './TransactionBlock';
15
15
  export * from './UpcomingSubscriptionBlock';
16
+ export * from './WeeklySmallPurchasesBlock';
16
17
  export * from './WithdrawalBlock';
@@ -45,97 +45,99 @@ import { transactionBlockVariant as Uo } from "./blocks/ComponentBlocks/Transact
45
45
  import { TransactionBlock as jo } from "./blocks/ComponentBlocks/TransactionBlock/TransactionBlock.es.js";
46
46
  import zo from "./components/SubscriptionHeroCard.es.js";
47
47
  import Ko from "./blocks/ComponentBlocks/UpcomingSubscriptionBlock/UpcomingSubscriptionBlock.es.js";
48
- import Xo from "./components/WithdrawalCard.es.js";
49
- import Zo from "./blocks/ComponentBlocks/WithdrawalBlock/WithdrawalBlock.es.js";
50
- import or from "./components/DesignateEmergencySavingsCard.es.js";
51
- import { SVGImageBlock as tr } from "./blocks/ImageBlocks/SVGImageBlock/SVGImageBlock.es.js";
52
- import ir from "./components/shared/StatusSnackbar.es.js";
53
- import pr from "./components/FeedbackDialog.es.js";
54
- import fr from "./components/FeedbackModal.es.js";
55
- import cr from "./components/ConnectionDetailDrillDown.es.js";
56
- import sr from "./components/SurveyModal.es.js";
57
- import Br from "./components/InsightErrorCard.es.js";
58
- import { ErrorCard as Cr } from "./components/ErrorCard.es.js";
59
- import kr from "./components/BadgedTile.es.js";
60
- import { OverflowMenu as Dr } from "./components/OverflowMenu.es.js";
61
- import { InsightOptionsMenu as Ar } from "./components/InsightOptionsMenu.es.js";
62
- import Ir from "./components/StatusBadge.es.js";
63
- import Tr from "./components/CompactInsightCard.es.js";
64
- import yr from "./components/AmountBreakdownCard.es.js";
65
- import { FeedbackBar as Rr } from "./components/FeedbackBar.es.js";
66
- import { DismissInsightDialog as Hr } from "./components/DismissInsightDialog.es.js";
67
- import { HiddenConfirmationCard as Or } from "./components/HiddenConfirmationCard.es.js";
68
- import { LoadingCard as Er } from "./components/LoadingCard.es.js";
69
- import { ObsolesceBanner as _r } from "./components/ObsolesceBanner.es.js";
70
- import xr from "./components/BaseLayout.es.js";
48
+ import Xo from "./blocks/ComponentBlocks/WeeklySmallPurchasesBlock/WeeklySmallPurchasesBlock.es.js";
49
+ import Zo from "./components/WithdrawalCard.es.js";
50
+ import or from "./blocks/ComponentBlocks/WithdrawalBlock/WithdrawalBlock.es.js";
51
+ import tr from "./components/DesignateEmergencySavingsCard.es.js";
52
+ import { SVGImageBlock as ir } from "./blocks/ImageBlocks/SVGImageBlock/SVGImageBlock.es.js";
53
+ import pr from "./components/shared/StatusSnackbar.es.js";
54
+ import fr from "./components/FeedbackDialog.es.js";
55
+ import cr from "./components/FeedbackModal.es.js";
56
+ import sr from "./components/ConnectionDetailDrillDown.es.js";
57
+ import Br from "./components/SurveyModal.es.js";
58
+ import Cr from "./components/InsightErrorCard.es.js";
59
+ import { ErrorCard as kr } from "./components/ErrorCard.es.js";
60
+ import Dr from "./components/BadgedTile.es.js";
61
+ import { OverflowMenu as Ar } from "./components/OverflowMenu.es.js";
62
+ import { InsightOptionsMenu as Ir } from "./components/InsightOptionsMenu.es.js";
63
+ import Tr from "./components/StatusBadge.es.js";
64
+ import yr from "./components/CompactInsightCard.es.js";
65
+ import Rr from "./components/AmountBreakdownCard.es.js";
66
+ import { FeedbackBar as Hr } from "./components/FeedbackBar.es.js";
67
+ import { DismissInsightDialog as Or } from "./components/DismissInsightDialog.es.js";
68
+ import { HiddenConfirmationCard as Er } from "./components/HiddenConfirmationCard.es.js";
69
+ import { LoadingCard as _r } from "./components/LoadingCard.es.js";
70
+ import { ObsolesceBanner as xr } from "./components/ObsolesceBanner.es.js";
71
+ import Ur from "./components/BaseLayout.es.js";
71
72
  export {
72
73
  W as AccountBlock,
73
74
  M as AccountHeroCard,
74
75
  J as AccountSwitchBlock,
75
- yr as AmountBreakdownCard,
76
+ Rr as AmountBreakdownCard,
76
77
  Co as AmountPill,
77
78
  e as BAR_ARIA_LABEL,
78
79
  f as BAR_CHART_VARIANTS,
79
- kr as BadgedTile,
80
+ Dr as BadgedTile,
80
81
  D as BarchartBlock,
81
- xr as BaseLayout,
82
+ Ur as BaseLayout,
82
83
  Q as BudgetBlock,
83
- Tr as CompactInsightCard,
84
- cr as ConnectionDetailDrillDown,
84
+ yr as CompactInsightCard,
85
+ sr as ConnectionDetailDrillDown,
85
86
  Y as DebtPayoffCard,
86
87
  mo as DebtsBlock,
87
- or as DesignateEmergencySavingsCard,
88
+ tr as DesignateEmergencySavingsCard,
88
89
  N as DetailedAccountBlock,
89
90
  N as DirectDepositBlock,
90
91
  V as DirectDepositCard,
91
- Hr as DismissInsightDialog,
92
+ Or as DismissInsightDialog,
92
93
  T as DonutChartBlock,
93
94
  A as DoubleBarChartBlock,
94
95
  y as DoubleProgressBarBlock,
95
- Cr as ErrorCard,
96
- Rr as FeedbackBar,
97
- pr as FeedbackDialog,
98
- fr as FeedbackModal,
96
+ kr as ErrorCard,
97
+ Hr as FeedbackBar,
98
+ fr as FeedbackDialog,
99
+ cr as FeedbackModal,
99
100
  ao as GasPurchaseBlock,
100
101
  eo as GoalProgressCard,
101
102
  no as GoalsBlock,
102
103
  d as HOST_ACTIONS,
103
- Or as HiddenConfirmationCard,
104
- Br as InsightErrorCard,
105
- Ar as InsightOptionsMenu,
104
+ Er as HiddenConfirmationCard,
105
+ Cr as InsightErrorCard,
106
+ Ir as InsightOptionsMenu,
106
107
  $ as InsightTransactionRow,
107
- Er as LoadingCard,
108
+ _r as LoadingCard,
108
109
  Bo as LogoClusterCard,
109
110
  R as LogoFromGuid,
110
111
  lo as LogoTile,
111
112
  Ao as MerchantBlock,
112
113
  ko as MerchantHighlightCard,
113
114
  Io as NoSpendDaysBlock,
114
- _r as ObsolesceBanner,
115
- Dr as OverflowMenu,
115
+ xr as ObsolesceBanner,
116
+ Ar as OverflowMenu,
116
117
  Do as P2PLogoStack,
117
118
  yo as RepeatingTransactionBlock,
118
- tr as SVGImageBlock,
119
+ ir as SVGImageBlock,
119
120
  Ro as SaveAnExtraCard,
120
121
  Ho as SaveExtraBlock,
121
122
  Eo as SavingsOpportunityBlock,
122
123
  Oo as SavingsOpportunityCard,
123
124
  _o as SavingsSummaryBlock,
124
- Ir as StatusBadge,
125
+ Tr as StatusBadge,
125
126
  xo as StatusMessageCard,
126
127
  r as StatusPill,
127
- ir as StatusSnackbar,
128
+ pr as StatusSnackbar,
128
129
  I as StepChartBlock,
129
130
  zo as SubscriptionHeroCard,
130
- sr as SurveyModal,
131
+ Br as SurveyModal,
131
132
  jo as TransactionBlock,
132
133
  ro as TransactionListCard,
133
134
  q as TransferLogoCard,
134
135
  yo as UpcomingBillBlock,
135
136
  To as UpcomingBillCard,
136
137
  Ko as UpcomingSubscriptionBlock,
137
- Zo as WithdrawalBlock,
138
- Xo as WithdrawalCard,
138
+ Xo as WeeklySmallPurchasesBlock,
139
+ or as WithdrawalBlock,
140
+ Zo as WithdrawalCard,
139
141
  n as barChartVariant,
140
142
  c as buildChartData,
141
143
  l as buildDataSeries,
@@ -1,59 +1,60 @@
1
- import { ContactSupportActionBlock as l } from "../actionBlocks/ContactSupportActionBlock.es.js";
2
- import { hasDrawerBlock as lo } from "./hasDrawerBlock.es.js";
1
+ import { ContactSupportActionBlock as p } from "../actionBlocks/ContactSupportActionBlock.es.js";
2
+ import { hasDrawerBlock as _o } from "./hasDrawerBlock.es.js";
3
3
  import { actionBlocksKey as o } from "./actionBlocksKey.es.js";
4
4
  import { BarchartBlock as _ } from "../blocks/ChartBlocks/BarchartBlock/BarchartBlock.es.js";
5
5
  import { DoubleBarChartBlock as s } from "../blocks/ChartBlocks/DoubleBarChartBlock/DoubleBarChartBlock.es.js";
6
6
  import C from "../blocks/ChartBlocks/StepChartBlock/StepChartBlock.es.js";
7
7
  import u from "../blocks/ChartBlocks/DonutChartBlock/DonutChartBlock.es.js";
8
- import B from "../blocks/ChartBlocks/DoubleProgressBarBlock/DoubleProgressBarBlock.es.js";
9
- import k from "../blocks/ComponentBlocks/DetailedAccountBlock/DetailedAccountBlock.es.js";
8
+ import k from "../blocks/ChartBlocks/DoubleProgressBarBlock/DoubleProgressBarBlock.es.js";
9
+ import B from "../blocks/ComponentBlocks/DetailedAccountBlock/DetailedAccountBlock.es.js";
10
10
  import T from "../blocks/ComponentBlocks/AccountBlock/AccountBlock.es.js";
11
11
  import A from "../blocks/ComponentBlocks/AccountSwitchBlock/AccountSwitchBlock.es.js";
12
- import { BudgetBlock as O } from "../blocks/ComponentBlocks/BudgetBlock/BudgetBlock.es.js";
13
- import f from "../blocks/ComponentBlocks/DebtsBlock/DebtsBlock.es.js";
12
+ import { BudgetBlock as f } from "../blocks/ComponentBlocks/BudgetBlock/BudgetBlock.es.js";
13
+ import O from "../blocks/ComponentBlocks/DebtsBlock/DebtsBlock.es.js";
14
14
  import N from "../blocks/ComponentBlocks/GasPurchaseBlock/GasPurchaseBlock.es.js";
15
15
  import I from "../blocks/ComponentBlocks/GoalsBlock/GoalsBlock.es.js";
16
16
  import d from "../blocks/ComponentBlocks/MerchantBlock/MerchantBlock.es.js";
17
- import g from "../blocks/ComponentBlocks/NoSpendDaysBlock/NoSpendDaysBlock.es.js";
17
+ import P from "../blocks/ComponentBlocks/NoSpendDaysBlock/NoSpendDaysBlock.es.js";
18
18
  import n from "../blocks/ComponentBlocks/RepeatingTransactionBlock/RepeatingTransactionBlock.es.js";
19
- import L from "../blocks/ComponentBlocks/SaveExtraBlock/SaveExtraBlock.es.js";
20
- import P from "../blocks/ComponentBlocks/SavingsOpportunityBlock/SavingsOpportunityBlock.es.js";
19
+ import g from "../blocks/ComponentBlocks/SaveExtraBlock/SaveExtraBlock.es.js";
20
+ import L from "../blocks/ComponentBlocks/SavingsOpportunityBlock/SavingsOpportunityBlock.es.js";
21
21
  import b from "../blocks/ComponentBlocks/SavingsSummaryBlock/SavingsSummaryBlock.es.js";
22
22
  import { TransactionBlock as S } from "../blocks/ComponentBlocks/TransactionBlock/TransactionBlock.es.js";
23
23
  import D from "../blocks/ComponentBlocks/UpcomingSubscriptionBlock/UpcomingSubscriptionBlock.es.js";
24
- import h from "../blocks/ComponentBlocks/WithdrawalBlock/WithdrawalBlock.es.js";
25
- import E from "../blocks/ImageBlocks/ImageBlock.es.js";
26
- import { SVGImageBlock as K } from "../blocks/ImageBlocks/SVGImageBlock/SVGImageBlock.es.js";
27
- import { FeedbackModalActionBlock as v } from "../actionBlocks/FeedbackModalActionBlock.es.js";
28
- import { ConnectionDetailActionBlock as R } from "../actionBlocks/ConnectionDetailActionBlock.es.js";
29
- import { ConnectWidgetActionBlock as y } from "../actionBlocks/ConnectWidgetActionBlock.es.js";
30
- import { SurveyModalActionBlock as M } from "../actionBlocks/SurveyModalActionBlock.es.js";
31
- import { SubscriptionStatusModalBlock as U } from "../actionBlocks/SubscriptionStatusModalBlock.es.js";
32
- import { PlaceholderActionBlock as w } from "../actionBlocks/PlaceholderActionBlock.es.js";
33
- import { getMakeTransferDrawerTitle as G } from "../actionBlocks/MakeTransferActionBlock/layout.es.js";
34
- import { MakeTransferActionBlockLayer as H } from "../actionBlocks/MakeTransferActionBlock/MakeTransferActionBlockLayer.es.js";
35
- import { getDrawerHeaderTitle as F } from "../actionBlocks/TransactionHistoryBlock/utils.es.js";
36
- import { TransactionDetailsBlock as Y } from "../actionBlocks/TransactionDetailsBlock/TransactionDetailsBlock.es.js";
24
+ import h from "../blocks/ComponentBlocks/WeeklySmallPurchasesBlock/WeeklySmallPurchasesBlock.es.js";
25
+ import E from "../blocks/ComponentBlocks/WithdrawalBlock/WithdrawalBlock.es.js";
26
+ import K from "../blocks/ImageBlocks/ImageBlock.es.js";
27
+ import { SVGImageBlock as v } from "../blocks/ImageBlocks/SVGImageBlock/SVGImageBlock.es.js";
28
+ import { FeedbackModalActionBlock as R } from "../actionBlocks/FeedbackModalActionBlock.es.js";
29
+ import { ConnectionDetailActionBlock as y } from "../actionBlocks/ConnectionDetailActionBlock.es.js";
30
+ import { ConnectWidgetActionBlock as M } from "../actionBlocks/ConnectWidgetActionBlock.es.js";
31
+ import { SurveyModalActionBlock as U } from "../actionBlocks/SurveyModalActionBlock.es.js";
32
+ import { SubscriptionStatusModalBlock as w } from "../actionBlocks/SubscriptionStatusModalBlock.es.js";
33
+ import { PlaceholderActionBlock as G } from "../actionBlocks/PlaceholderActionBlock.es.js";
34
+ import { getMakeTransferDrawerTitle as H } from "../actionBlocks/MakeTransferActionBlock/layout.es.js";
35
+ import { MakeTransferActionBlockLayer as F } from "../actionBlocks/MakeTransferActionBlock/MakeTransferActionBlockLayer.es.js";
36
+ import { getDrawerHeaderTitle as Y } from "../actionBlocks/TransactionHistoryBlock/utils.es.js";
37
+ import { TransactionDetailsBlock as x } from "../actionBlocks/TransactionDetailsBlock/TransactionDetailsBlock.es.js";
37
38
  import { useTransactionDetailsPrepare as c } from "../actionBlocks/TransactionDetailsBlock/useTransactionDetailsPrepare.es.js";
38
- import { TransactionHistoryBlock as x } from "../actionBlocks/TransactionHistoryBlock/TransactionHistoryBlock.es.js";
39
- import { useTransactionHistoryPrepare as V } from "../actionBlocks/TransactionHistoryBlock/useTransactionHistoryPrepare.es.js";
39
+ import { TransactionHistoryBlock as V } from "../actionBlocks/TransactionHistoryBlock/TransactionHistoryBlock.es.js";
40
+ import { useTransactionHistoryPrepare as W } from "../actionBlocks/TransactionHistoryBlock/useTransactionHistoryPrepare.es.js";
40
41
  import { useRecurringTransactionPrepare as m } from "../actionBlocks/RecurringTransactionBlock/useRecurringTransactionPrepare.es.js";
41
42
  import { RecurringTransactionBlock as z } from "../actionBlocks/RecurringTransactionBlock/RecurringTransactionBlock.es.js";
42
- import { HelpBlock as W } from "../actionBlocks/HelpBlock/HelpBlock.es.js";
43
- import { getTransactionListDrawerTitle as q } from "../actionBlocks/TransactionListBlock/layout.es.js";
44
- import { TransactionListBlock as Z } from "../actionBlocks/TransactionListBlock/TransactionListBlock.es.js";
45
- import { RemainingCashBlock as j } from "../actionBlocks/RemainingCashBlock/RemainingCashBlock.es.js";
46
- import { AmountInputModalBlock as p } from "../actionBlocks/AmountInputModalBlock/AmountInputModalBlock.es.js";
47
- import { OverdraftBlock as J, useOverdraftPrepare as Q } from "../actionBlocks/OverdraftBlock/OverdraftBlock.es.js";
48
- import { AccountListBlock as X } from "../actionBlocks/AccountListBlock/AccountListBlock.es.js";
49
- import { useAccountListPrepare as $ } from "../actionBlocks/AccountListBlock/useAccountListPrepare.es.js";
50
- import { EmergencySavingsBlock as oo } from "../actionBlocks/EmergencySavingsBlock/EmergencySavingsBlock.es.js";
51
- import { CreditUtilizationBlock as to } from "../actionBlocks/CreditUtilizationBlock/CreditUtilizationBlock.es.js";
52
- import { useCreditUtilizationPrepare as ro } from "../actionBlocks/CreditUtilizationBlock/useCreditUtilizationPrepare.es.js";
53
- import { PayoffCalculatorBlock as eo, usePayoffCalculatorPrepare as io } from "../actionBlocks/PayoffCalculatorBlock/PayoffCalculatorBlock.es.js";
54
- import { BudgetDetailsBlock as ao } from "../actionBlocks/BudgetDetailsBlock/BudgetDetailsBlock.es.js";
55
- import { AccountDetailsBlock as no } from "../actionBlocks/AccountDetailsBlock/AccountDetailsBlock.es.js";
56
- import { useAccountDetailsPrepare as co } from "../actionBlocks/AccountDetailsBlock/useAccountDetailsPrepare.es.js";
43
+ import { HelpBlock as q } from "../actionBlocks/HelpBlock/HelpBlock.es.js";
44
+ import { getTransactionListDrawerTitle as Z } from "../actionBlocks/TransactionListBlock/layout.es.js";
45
+ import { TransactionListBlock as j } from "../actionBlocks/TransactionListBlock/TransactionListBlock.es.js";
46
+ import { RemainingCashBlock as J } from "../actionBlocks/RemainingCashBlock/RemainingCashBlock.es.js";
47
+ import { AmountInputModalBlock as l } from "../actionBlocks/AmountInputModalBlock/AmountInputModalBlock.es.js";
48
+ import { OverdraftBlock as Q, useOverdraftPrepare as X } from "../actionBlocks/OverdraftBlock/OverdraftBlock.es.js";
49
+ import { AccountListBlock as $ } from "../actionBlocks/AccountListBlock/AccountListBlock.es.js";
50
+ import { useAccountListPrepare as oo } from "../actionBlocks/AccountListBlock/useAccountListPrepare.es.js";
51
+ import { EmergencySavingsBlock as to } from "../actionBlocks/EmergencySavingsBlock/EmergencySavingsBlock.es.js";
52
+ import { CreditUtilizationBlock as ro } from "../actionBlocks/CreditUtilizationBlock/CreditUtilizationBlock.es.js";
53
+ import { useCreditUtilizationPrepare as eo } from "../actionBlocks/CreditUtilizationBlock/useCreditUtilizationPrepare.es.js";
54
+ import { PayoffCalculatorBlock as io, usePayoffCalculatorPrepare as ao } from "../actionBlocks/PayoffCalculatorBlock/PayoffCalculatorBlock.es.js";
55
+ import { BudgetDetailsBlock as no } from "../actionBlocks/BudgetDetailsBlock/BudgetDetailsBlock.es.js";
56
+ import { AccountDetailsBlock as co } from "../actionBlocks/AccountDetailsBlock/AccountDetailsBlock.es.js";
57
+ import { useAccountDetailsPrepare as mo } from "../actionBlocks/AccountDetailsBlock/useAccountDetailsPrepare.es.js";
57
58
  var i = (e) => {
58
59
  }, t = (e) => ({
59
60
  get Component() {
@@ -68,24 +69,24 @@ var i = (e) => {
68
69
  get presentation() {
69
70
  return e().presentation;
70
71
  }
71
- }), st = {
72
+ }), ut = {
72
73
  [o.PLACEHOLDER_ACTION_BLOCK]: t(() => ({
73
- Component: w,
74
+ Component: G,
74
75
  usePrepare: i,
75
76
  title: () => "Action Block Layer Drilldown"
76
77
  })),
77
78
  [o.MAKE_TRANSFER_ACTION_BLOCK]: t(() => ({
78
- Component: H,
79
+ Component: F,
79
80
  usePrepare: i,
80
- title: G
81
+ title: H
81
82
  })),
82
83
  [o.TRANSCATION_HISTORY_ACTION_BLOCK]: t(() => ({
83
- Component: x,
84
- usePrepare: V,
85
- title: F
84
+ Component: V,
85
+ usePrepare: W,
86
+ title: Y
86
87
  })),
87
88
  [o.TRANSACTION_DETAILS_ACTION_BLOCK]: t(() => ({
88
- Component: Y,
89
+ Component: x,
89
90
  usePrepare: c,
90
91
  title: () => "Transaction Details"
91
92
  })),
@@ -95,123 +96,124 @@ var i = (e) => {
95
96
  title: (e, r) => r.recurring?.expense_details ?? ""
96
97
  })),
97
98
  [o.REMAINING_CASH_ACTION_BLOCK]: t(() => ({
98
- Component: j,
99
+ Component: J,
99
100
  usePrepare: m,
100
101
  title: (e, r) => r.insights_feed?.remaining_cash?.title ?? ""
101
102
  })),
102
103
  [o.CONTACT_SUPPORT_ACTION_BLOCK]: t(() => ({
103
- Component: l,
104
+ Component: p,
104
105
  usePrepare: i,
105
106
  title: (e, r) => r.help?.request_support ?? ""
106
107
  })),
107
108
  [o.FEEDBACK_MODAL_ACTION_BLOCK]: t(() => ({
108
- Component: v,
109
+ Component: R,
109
110
  usePrepare: i,
110
111
  presentation: "modal"
111
112
  })),
112
113
  [o.CONNECTION_DETAIL_ACTION_BLOCK]: t(() => ({
113
- Component: R,
114
+ Component: y,
114
115
  usePrepare: i,
115
116
  title: (e, r) => r.insights_feed?.connection_details?.connection_details_drawer_title ?? ""
116
117
  })),
117
118
  [o.CONNECT_WIDGET_ACTION_BLOCK]: t(() => ({
118
- Component: y,
119
+ Component: M,
119
120
  usePrepare: i
120
121
  })),
121
122
  [o.SURVEY_MODAL_ACTION_BLOCK]: t(() => ({
122
- Component: M,
123
+ Component: U,
123
124
  usePrepare: i,
124
125
  presentation: "modal"
125
126
  })),
126
127
  [o.SUBSCRIPTION_STATUS_MODAL_ACTION_BLOCK]: t(() => ({
127
- Component: U,
128
+ Component: w,
128
129
  usePrepare: i,
129
130
  presentation: "modal"
130
131
  })),
131
132
  [o.TRANSACTION_LIST_ACTION_BLOCK]: t(() => ({
132
- Component: Z,
133
+ Component: j,
133
134
  usePrepare: c,
134
- title: q
135
+ title: Z
135
136
  })),
136
137
  [o.AMOUNT_INPUT_MODAL_ACTION_BLOCK]: t(() => ({
137
- Component: p,
138
+ Component: l,
138
139
  presentation: "modal",
139
140
  usePrepare: i
140
141
  })),
141
142
  [o.SAFETY_NET_ACTION_BLOCK]: t(() => ({
142
- Component: p,
143
+ Component: l,
143
144
  presentation: "modal",
144
145
  usePrepare: i
145
146
  })),
146
147
  [o.OVERDRAFT_ACTION_BLOCK]: t(() => ({
147
- Component: J,
148
- usePrepare: Q,
148
+ Component: Q,
149
+ usePrepare: X,
149
150
  title: (e, r, a) => a?.insights_payload?.title ?? ""
150
151
  })),
151
152
  [o.CREDIT_UTILIZATION_ACTION_BLOCK]: t(() => ({
152
- Component: to,
153
- usePrepare: ro,
153
+ Component: ro,
154
+ usePrepare: eo,
154
155
  title: (e, r) => r.insights_feed?.credit_utilization?.title ?? ""
155
156
  })),
156
157
  [o.EMERGENCY_SAVINGS_ACTION_BLOCK]: t(() => ({
157
- Component: oo,
158
+ Component: to,
158
159
  usePrepare: i,
159
160
  title: (e, r, a) => a?.insights_payload?.title ?? ""
160
161
  })),
161
162
  [o.PAYOFF_CALCULATOR_ACTION_BLOCK]: t(() => ({
162
- Component: eo,
163
- usePrepare: io,
163
+ Component: io,
164
+ usePrepare: ao,
164
165
  title: (e, r) => r.insights_feed?.payoff_calculator?.title ?? ""
165
166
  })),
166
167
  [o.BUDGET_DETAILS_ACTION_BLOCK]: t(() => ({
167
- Component: ao,
168
+ Component: no,
168
169
  usePrepare: i,
169
170
  title: (e, r, a) => a?.insights_payload?.title || r.budgets?.details_title || ""
170
171
  })),
171
172
  [o.ACCOUNT_DETAILS_ACTION_BLOCK]: t(() => ({
172
- Component: no,
173
- usePrepare: co,
173
+ Component: co,
174
+ usePrepare: mo,
174
175
  title: (e, r) => r.accounts?.account_details ?? ""
175
176
  })),
176
177
  [o.ACCOUNT_LIST_ACTION_BLOCK]: t(() => ({
177
- Component: X,
178
- usePrepare: $,
178
+ Component: $,
179
+ usePrepare: oo,
179
180
  title: (e, r) => r.insights_feed?.account_list?.title ?? ""
180
181
  })),
181
182
  [o.HELP_ACTION_BLOCK]: t(() => ({
182
- Component: W,
183
+ Component: q,
183
184
  usePrepare: i
184
185
  }))
185
- }, Ct = {
186
+ }, kt = {
186
187
  account_block: T,
187
188
  account_switch_block: A,
188
- direct_deposit_block: k,
189
+ direct_deposit_block: B,
189
190
  bar_chart_block: _,
190
- budget_block: O,
191
- debts_block: f,
191
+ budget_block: f,
192
+ debts_block: O,
192
193
  donut_chart_block: u,
193
194
  double_bar_chart_block: s,
194
- double_progress_bar_block: B,
195
+ double_progress_bar_block: k,
195
196
  gas_purchase_block: N,
196
197
  goals_block: I,
197
- image_block: E,
198
+ image_block: K,
198
199
  merchant_block: d,
199
- no_spend_days_block: g,
200
+ no_spend_days_block: P,
200
201
  repeating_transaction_block: n,
201
- save_extra_block: L,
202
- savings_amount_block: P,
202
+ save_extra_block: g,
203
+ savings_amount_block: L,
203
204
  savings_summary_block: b,
204
205
  step_chart_block: C,
205
- svg_image_block: K,
206
+ svg_image_block: v,
206
207
  upcoming_bill_block: n,
207
208
  upcoming_subscription_block: D,
208
- withdrawal_block: h,
209
+ weekly_small_purchases_block: h,
210
+ withdrawal_block: E,
209
211
  transaction_block: S
210
212
  };
211
213
  export {
212
- st as actionBlocks,
213
- Ct as blocks,
214
- lo as hasDrawerBlock
214
+ ut as actionBlocks,
215
+ kt as blocks,
216
+ _o as hasDrawerBlock
215
217
  };
216
218
 
217
219
  //# 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 GasPurchaseBlock,\n GoalsBlock,\n MerchantBlock,\n DoubleBarChartBlock,\n DoubleProgressBarBlock,\n NoSpendDaysBlock,\n RepeatingTransactionBlock,\n SaveExtraBlock,\n SavingsOpportunityBlock,\n SavingsSummaryBlock,\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 { SubscriptionStatusModalBlock } from '../actionBlocks/SubscriptionStatusModalBlock'\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 { useTransactionHistoryPrepare } from '../actionBlocks/TransactionHistoryBlock/useTransactionHistoryPrepare'\nimport {\n TransactionDetailsBlock,\n useTransactionDetailsPrepare,\n} from '../actionBlocks/TransactionDetailsBlock'\nimport {\n RecurringTransactionBlock,\n useRecurringTransactionPrepare,\n} from '../actionBlocks/RecurringTransactionBlock'\nimport { TransactionListBlock } from '../actionBlocks/TransactionListBlock'\nimport { getTransactionListDrawerTitle } from '../actionBlocks/TransactionListBlock/layout'\nimport { RemainingCashBlock } from '../actionBlocks/RemainingCashBlock'\nimport { AmountInputModalBlock } from '../actionBlocks/AmountInputModalBlock'\nimport { OverdraftBlock, useOverdraftPrepare } from '../actionBlocks/OverdraftBlock'\nimport { AccountListBlock, useAccountListPrepare } from '../actionBlocks/AccountListBlock'\nimport { EmergencySavingsBlock } from '../actionBlocks/EmergencySavingsBlock'\nimport {\n CreditUtilizationBlock,\n useCreditUtilizationPrepare,\n} from '../actionBlocks/CreditUtilizationBlock'\nimport {\n PayoffCalculatorBlock,\n usePayoffCalculatorPrepare,\n} from '../actionBlocks/PayoffCalculatorBlock'\nimport { BudgetDetailsBlock } from '../actionBlocks/BudgetDetailsBlock'\nimport { AccountDetailsBlock, useAccountDetailsPrepare } from '../actionBlocks/AccountDetailsBlock'\nimport { HelpBlock } from '../actionBlocks/HelpBlock'\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: useTransactionHistoryPrepare,\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 // Unexpected Subscription Payment's Subscription Status modal.\n [actionBlocksKey.SUBSCRIPTION_STATUS_MODAL_ACTION_BLOCK]: liveEntry(() => ({\n Component: SubscriptionStatusModalBlock,\n usePrepare: noop,\n presentation: 'modal',\n })),\n [actionBlocksKey.TRANSACTION_LIST_ACTION_BLOCK]: liveEntry(() => ({\n Component: TransactionListBlock,\n usePrepare: useTransactionDetailsPrepare,\n title: getTransactionListDrawerTitle,\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 // Savings Opportunity's safety-net reminder (secondary CTA). ditto names a dedicated\n // `safety_net_block` with no CTA variant, so it opens the same amount-input modal, which reads the\n // safety_net variant from the block name (see resolveAmountInputVariant).\n [actionBlocksKey.SAFETY_NET_ACTION_BLOCK]: liveEntry(() => ({\n Component: AmountInputModalBlock,\n presentation: 'modal',\n usePrepare: noop,\n })),\n // Transparent Overdraft's \"Learn more\": the projected overdraft, its account and the confidence\n // meter. Titled from the beat, as the pulse drawer was.\n [actionBlocksKey.OVERDRAFT_ACTION_BLOCK]: liveEntry(() => ({\n Component: OverdraftBlock,\n usePrepare: useOverdraftPrepare,\n title: (_variant, _copy, beat) => beat?.insights_payload?.title ?? '',\n })),\n // Credit Utilization's \"Learn more\": donut summary, legend and the per-card list. Loads accounts\n // for the institution logos; the rows themselves ride on the beat.\n [actionBlocksKey.CREDIT_UTILIZATION_ACTION_BLOCK]: liveEntry(() => ({\n Component: CreditUtilizationBlock,\n usePrepare: useCreditUtilizationPrepare,\n title: (_variant, copy) => copy.insights_feed?.credit_utilization?.title ?? '',\n })),\n [actionBlocksKey.EMERGENCY_SAVINGS_ACTION_BLOCK]: liveEntry(() => ({\n Component: EmergencySavingsBlock,\n usePrepare: noop,\n title: (_variant, _copy, beat) => beat?.insights_payload?.title ?? '',\n })),\n // Monthly Credit Card Interest Summary's \"Learn how to save\": the credit card payoff calculator.\n [actionBlocksKey.PAYOFF_CALCULATOR_ACTION_BLOCK]: liveEntry(() => ({\n Component: PayoffCalculatorBlock,\n usePrepare: usePayoffCalculatorPrepare,\n title: (_variant, copy) => copy.insights_feed?.payoff_calculator?.title ?? '',\n })),\n [actionBlocksKey.BUDGET_DETAILS_ACTION_BLOCK]: liveEntry(() => ({\n Component: BudgetDetailsBlock,\n usePrepare: noop,\n title: (_variant, copy, beat) =>\n beat?.insights_payload?.title || copy.budgets?.details_title || '',\n })),\n // The accounts widget's account details (header, trend chart, tabs, connection, actions) for the\n // beat's primary account. Shared by every beat that opens an account.\n [actionBlocksKey.ACCOUNT_DETAILS_ACTION_BLOCK]: liveEntry(() => ({\n Component: AccountDetailsBlock,\n usePrepare: useAccountDetailsPrepare,\n title: (_variant, copy) => copy.accounts?.account_details ?? '',\n })),\n // Monthly Obligations Status's account list: the beat's calculation and the accounts behind it.\n [actionBlocksKey.ACCOUNT_LIST_ACTION_BLOCK]: liveEntry(() => ({\n Component: AccountListBlock,\n usePrepare: useAccountListPrepare,\n title: (_variant, copy) => copy.insights_feed?.account_list?.title ?? '',\n })),\n // A beat's \"Learn More\": its pre-localized help title and body from the payload's\n // `drilldown_data`. The drawer title is the CTA label.\n [actionBlocksKey.HELP_ACTION_BLOCK]: liveEntry(() => ({\n Component: HelpBlock,\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 gas_purchase_block: GasPurchaseBlock,\n goals_block: GoalsBlock,\n image_block: ImageBlock,\n merchant_block: MerchantBlock,\n no_spend_days_block: NoSpendDaysBlock,\n repeating_transaction_block: RepeatingTransactionBlock,\n save_extra_block: SaveExtraBlock,\n savings_amount_block: SavingsOpportunityBlock,\n savings_summary_block: SavingsSummaryBlock,\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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AA,EACpB,eAAe;AAAA,EACf,sBAAsB;AAAA,EACtB,sBAAsB;AAAA,EACtB,iBAAiB;AAAA,EACjB,cAAc;AAAA,EACd,aAAa;AAAA,EACb,mBAAmB;AAAA,EACnB,wBAAwB;AAAA,EACxB,2BAA2B;AAAA,EAC3B,oBAAoB;AAAA,EACpB,aAAa;AAAA,EACb,aAAa;AAAA,EACb,gBAAgB;AAAA,EAChB,qBAAqB;AAAA,EACrB,6BAA6B;AAAA,EAC7B,kBAAkB;AAAA,EAClB,sBAAsB;AAAA,EACtB,uBAAuB;AAAA,EACvB,kBAAkB;AAAA,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 GasPurchaseBlock,\n GoalsBlock,\n MerchantBlock,\n DoubleBarChartBlock,\n DoubleProgressBarBlock,\n NoSpendDaysBlock,\n RepeatingTransactionBlock,\n SaveExtraBlock,\n SavingsOpportunityBlock,\n SavingsSummaryBlock,\n SVGImageBlock,\n UpcomingSubscriptionBlock,\n WeeklySmallPurchasesBlock,\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 { SubscriptionStatusModalBlock } from '../actionBlocks/SubscriptionStatusModalBlock'\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 { useTransactionHistoryPrepare } from '../actionBlocks/TransactionHistoryBlock/useTransactionHistoryPrepare'\nimport {\n TransactionDetailsBlock,\n useTransactionDetailsPrepare,\n} from '../actionBlocks/TransactionDetailsBlock'\nimport {\n RecurringTransactionBlock,\n useRecurringTransactionPrepare,\n} from '../actionBlocks/RecurringTransactionBlock'\nimport { TransactionListBlock } from '../actionBlocks/TransactionListBlock'\nimport { getTransactionListDrawerTitle } from '../actionBlocks/TransactionListBlock/layout'\nimport { RemainingCashBlock } from '../actionBlocks/RemainingCashBlock'\nimport { AmountInputModalBlock } from '../actionBlocks/AmountInputModalBlock'\nimport { OverdraftBlock, useOverdraftPrepare } from '../actionBlocks/OverdraftBlock'\nimport { AccountListBlock, useAccountListPrepare } from '../actionBlocks/AccountListBlock'\nimport { EmergencySavingsBlock } from '../actionBlocks/EmergencySavingsBlock'\nimport {\n CreditUtilizationBlock,\n useCreditUtilizationPrepare,\n} from '../actionBlocks/CreditUtilizationBlock'\nimport {\n PayoffCalculatorBlock,\n usePayoffCalculatorPrepare,\n} from '../actionBlocks/PayoffCalculatorBlock'\nimport { BudgetDetailsBlock } from '../actionBlocks/BudgetDetailsBlock'\nimport { AccountDetailsBlock, useAccountDetailsPrepare } from '../actionBlocks/AccountDetailsBlock'\nimport { HelpBlock } from '../actionBlocks/HelpBlock'\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: useTransactionHistoryPrepare,\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 // Unexpected Subscription Payment's Subscription Status modal.\n [actionBlocksKey.SUBSCRIPTION_STATUS_MODAL_ACTION_BLOCK]: liveEntry(() => ({\n Component: SubscriptionStatusModalBlock,\n usePrepare: noop,\n presentation: 'modal',\n })),\n [actionBlocksKey.TRANSACTION_LIST_ACTION_BLOCK]: liveEntry(() => ({\n Component: TransactionListBlock,\n usePrepare: useTransactionDetailsPrepare,\n title: getTransactionListDrawerTitle,\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 // Savings Opportunity's safety-net reminder (secondary CTA). ditto names a dedicated\n // `safety_net_block` with no CTA variant, so it opens the same amount-input modal, which reads the\n // safety_net variant from the block name (see resolveAmountInputVariant).\n [actionBlocksKey.SAFETY_NET_ACTION_BLOCK]: liveEntry(() => ({\n Component: AmountInputModalBlock,\n presentation: 'modal',\n usePrepare: noop,\n })),\n // Transparent Overdraft's \"Learn more\": the projected overdraft, its account and the confidence\n // meter. Titled from the beat, as the pulse drawer was.\n [actionBlocksKey.OVERDRAFT_ACTION_BLOCK]: liveEntry(() => ({\n Component: OverdraftBlock,\n usePrepare: useOverdraftPrepare,\n title: (_variant, _copy, beat) => beat?.insights_payload?.title ?? '',\n })),\n // Credit Utilization's \"Learn more\": donut summary, legend and the per-card list. Loads accounts\n // for the institution logos; the rows themselves ride on the beat.\n [actionBlocksKey.CREDIT_UTILIZATION_ACTION_BLOCK]: liveEntry(() => ({\n Component: CreditUtilizationBlock,\n usePrepare: useCreditUtilizationPrepare,\n title: (_variant, copy) => copy.insights_feed?.credit_utilization?.title ?? '',\n })),\n [actionBlocksKey.EMERGENCY_SAVINGS_ACTION_BLOCK]: liveEntry(() => ({\n Component: EmergencySavingsBlock,\n usePrepare: noop,\n title: (_variant, _copy, beat) => beat?.insights_payload?.title ?? '',\n })),\n // Monthly Credit Card Interest Summary's \"Learn how to save\": the credit card payoff calculator.\n [actionBlocksKey.PAYOFF_CALCULATOR_ACTION_BLOCK]: liveEntry(() => ({\n Component: PayoffCalculatorBlock,\n usePrepare: usePayoffCalculatorPrepare,\n title: (_variant, copy) => copy.insights_feed?.payoff_calculator?.title ?? '',\n })),\n [actionBlocksKey.BUDGET_DETAILS_ACTION_BLOCK]: liveEntry(() => ({\n Component: BudgetDetailsBlock,\n usePrepare: noop,\n title: (_variant, copy, beat) =>\n beat?.insights_payload?.title || copy.budgets?.details_title || '',\n })),\n // The accounts widget's account details (header, trend chart, tabs, connection, actions) for the\n // beat's primary account. Shared by every beat that opens an account.\n [actionBlocksKey.ACCOUNT_DETAILS_ACTION_BLOCK]: liveEntry(() => ({\n Component: AccountDetailsBlock,\n usePrepare: useAccountDetailsPrepare,\n title: (_variant, copy) => copy.accounts?.account_details ?? '',\n })),\n // Monthly Obligations Status's account list: the beat's calculation and the accounts behind it.\n [actionBlocksKey.ACCOUNT_LIST_ACTION_BLOCK]: liveEntry(() => ({\n Component: AccountListBlock,\n usePrepare: useAccountListPrepare,\n title: (_variant, copy) => copy.insights_feed?.account_list?.title ?? '',\n })),\n // A beat's \"Learn More\": its pre-localized help title and body from the payload's\n // `drilldown_data`. The drawer title is the CTA label.\n [actionBlocksKey.HELP_ACTION_BLOCK]: liveEntry(() => ({\n Component: HelpBlock,\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 gas_purchase_block: GasPurchaseBlock,\n goals_block: GoalsBlock,\n image_block: ImageBlock,\n merchant_block: MerchantBlock,\n no_spend_days_block: NoSpendDaysBlock,\n repeating_transaction_block: RepeatingTransactionBlock,\n save_extra_block: SaveExtraBlock,\n savings_amount_block: SavingsOpportunityBlock,\n savings_summary_block: SavingsSummaryBlock,\n step_chart_block: StepChartBlock,\n svg_image_block: SVGImageBlock,\n upcoming_bill_block: RepeatingTransactionBlock,\n upcoming_subscription_block: UpcomingSubscriptionBlock,\n weekly_small_purchases_block: WeeklySmallPurchasesBlock,\n withdrawal_block: WithdrawalBlock,\n transaction_block: TransactionBlock,\n} as Record<string, React.ComponentType<{ payload: InsightsPayload; beatGuid?: string }>>\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA4EA,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,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
2
  "name": "@mx-cartographer/experiences",
3
- "version": "9.7.103",
3
+ "version": "9.7.105",
4
4
  "description": "Library containing experience widgets",
5
5
  "author": "MX",
6
6
  "license": "MIT",