@mx-cartographer/experiences 9.7.11 → 9.7.13

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (26) hide show
  1. package/CHANGELOG.md +14 -0
  2. package/dist/core/types/Insights.d.ts +9 -4
  3. package/dist/core/types/Insights.es.js.map +1 -1
  4. package/dist/core/types/InsightsInstanceSlotData.d.ts +1 -11
  5. package/dist/core/types/InsightsInstanceSlotData.es.js.map +1 -1
  6. package/dist/insights-v2/actionBlocks/TransactionDetailsBlock/useTransactionDetailsBlock.d.ts +5 -0
  7. package/dist/insights-v2/actionBlocks/TransactionDetailsBlock/useTransactionDetailsBlock.es.js +27 -11
  8. package/dist/insights-v2/actionBlocks/TransactionDetailsBlock/useTransactionDetailsBlock.es.js.map +1 -1
  9. package/dist/insights-v2/actionBlocks/TransactionListBlock/TransactionListBlock.es.js +26 -20
  10. package/dist/insights-v2/actionBlocks/TransactionListBlock/TransactionListBlock.es.js.map +1 -1
  11. package/dist/insights-v2/blocks/ChartBlocks/DoubleProgressBarBlock/DoubleProgressBarBlock.d.ts +13 -3
  12. package/dist/insights-v2/blocks/ChartBlocks/DoubleProgressBarBlock/DoubleProgressBarBlock.es.js +19 -14
  13. package/dist/insights-v2/blocks/ChartBlocks/DoubleProgressBarBlock/DoubleProgressBarBlock.es.js.map +1 -1
  14. package/dist/insights-v2/blocks/ComponentBlocks/TransactionBlock/TransactionBlock.d.ts +3 -0
  15. package/dist/insights-v2/blocks/ComponentBlocks/TransactionBlock/TransactionBlock.es.js +54 -39
  16. package/dist/insights-v2/blocks/ComponentBlocks/TransactionBlock/TransactionBlock.es.js.map +1 -1
  17. package/dist/insights-v2/blocks/ComponentBlocks/TransactionBlock/layout.d.ts +5 -0
  18. package/dist/insights-v2/blocks/ComponentBlocks/TransactionBlock/layout.es.js +11 -6
  19. package/dist/insights-v2/blocks/ComponentBlocks/TransactionBlock/layout.es.js.map +1 -1
  20. package/dist/insights-v2/index.es.js +56 -56
  21. package/dist/microinsights/constants/Analytics.d.ts +1 -0
  22. package/dist/microinsights/constants/Analytics.es.js +17 -16
  23. package/dist/microinsights/constants/Analytics.es.js.map +1 -1
  24. package/dist/trends/constants/TrendsInsights.es.js +1 -0
  25. package/dist/trends/constants/TrendsInsights.es.js.map +1 -1
  26. package/package.json +1 -1
package/CHANGELOG.md CHANGED
@@ -1,3 +1,17 @@
1
+ ## [9.7.13] - 10-20-2026
2
+
3
+ - **CHANGED** - `double_progress_bar_block` now renders from the V2 envelope: it reads the two bars from `instance_slot.data.series` as `[previous, latest]` (`primary_text` label, `amount`), formats the amount, clamps the previous bar to 0–100 (previous / latest) and draws the latest at 100%, and renders nothing unless both rows carry finite numeric amounts. The legacy `instance_slot_data.doubleProgressBar` shape is **removed** (the dead `DoubleProgressBarBlockData` type with it) — a V1 emitter of that shape now renders a blank block. The Subscription Price Increase mock fixture moves to the envelope shape (WEC-1934)
4
+ - **CHANGED** - The Subscription Price Increase fixture now mirrors the envelope tupac sends for `SubscriptionPriceIncreaseV2` (ditto `subscription_price_increase_v2.yml`, ditto !56): beat template `SubscriptionPriceIncreaseV2`, `variant` `with_merchant`, title "Price Increase" and the mrs_content V2 description, header `logo` as merchant guid with the category `fallback_guid`, `primary_cta` "View Details" on `recurring_transaction_block` (`variant` / `action_key` null), and no `secondary_cta` (tupac omits it). The contract test, `blocks` fixture test and both stories look the beat up by the V2 template. The drawer still resolves the subscription from the beat's `primary_repeating_transaction_guid`; a per-CTA `drilldown_data` follows separately (WEC-1934)
5
+ - **CHANGED** - `DoubleProgressBarBlock` drops its `data-testid`; tests query the bars by their `progressbar` role and accessible name (WEC-1934)
6
+ - **ADDED** - `SubscriptionPriceIncreaseV2` beside the V1 name in `TRENDS_BEAT_TEMPLATES` and the micro-insights analytics `TEMPLATE_NAMES`, so a client moved to the V2 template keeps the beat in Trends and its micro view / click events. V1 stays listed for clients still on it (WEC-1934)
7
+
8
+ ## [9.7.12] - 10-20-2026
9
+
10
+ - **ADDED** - `transaction_block` `status_message` variant: no rows, an icon + message banner (`StatusMessageCard`, `role="status"`) from `instance_slot.data.message` and `instance_slot.data.icon` (through `LogoFromGuid`, so a malformed `ICO-` guid drops only the icon). Renders nothing, and warns, without a non-blank message; the icon is `aria-hidden`. Uncategorized Transactions V2's `complete` card ("All Categorized!"); story included (WEC-2005)
11
+ - **CHANGED** - `TransactionListBlock` reads the rows from `drilldown_data.transaction_guids`, and from `instance_slot_data.transaction_guids` only when that key is absent. A list that is present but not all strings, from either source, lists no transactions and warns (WEC-2005)
12
+ - **CHANGED** - `DrilldownData` values may be a `string[]` (WEC-2005)
13
+ - **FIXED** - An edit made in an insight's Transaction Details drawer (category, date, memo...) tells the host the beat is stale (`staleBeatGuid`, as the `refreshBeat` effect does), so a sampled beat's card, such as Uncategorized Transactions V2's count, refreshes without a page reload (WEC-2005)
14
+
1
15
  ## [9.7.11] - 10-20-2026
2
16
 
3
17
  - **CHANGED** - `AccountBlock` renders its confetti-tile and detailed-hero logos from `instance_slot.data.logo` through `LogoFromGuid` (the guid prefix picks merchant / institution / category / `ICO-` icon), replacing `DepositLogo`, the `depositIcons` map and the flat `merchant_guid` / `category_guid` / `institution_guid` logo inputs. An `ICO-` logo on the confetti tile keeps its look (an outlined 24px glyph on the `success.main` square), drawn with `Icon` as `IconComponent` does. Stories send the logo (with `amount` / `header_text` / `sub_text`) on `data` (WEC-1929)
@@ -31,10 +31,12 @@ export interface Pill {
31
31
  }
32
32
  /**
33
33
  * V2: facts a drilldown shows that the card does not (e.g. the account number for the Transaction
34
- * Details drawer). A flat hash shared by every CTA of the card, omitted when the insight has none.
35
- * Never carries copy or user actions (memo, tags, hide, flag come from the transaction store).
34
+ * Details drawer), or the guid list a list drawer shows (`transaction_guids`). Scalars or string
35
+ * lists, shared by every CTA of the card, omitted when the insight has none. Never carries copy or
36
+ * user actions (memo, tags, hide, flag come from the transaction store). Values come from the
37
+ * server, so a reader still checks each value's runtime shape.
36
38
  */
37
- export type DrilldownData = Record<string, string | number | boolean | null>;
39
+ export type DrilldownData = Record<string, string | number | boolean | null | string[]>;
38
40
  export interface InsightsPayload {
39
41
  widget_type: WidgetType;
40
42
  instance_slot: InstanceSlot;
@@ -60,7 +62,10 @@ export interface InsightsPayload {
60
62
  variant?: string;
61
63
  /** V2, `embedded` envelope only: the transaction-row pill. */
62
64
  pill?: Pill;
63
- /** V2: drilldown-only facts, e.g. `{ account_number: 'XXXXXXXX043' }`. */
65
+ /**
66
+ * V2: drilldown-only facts, e.g. `{ account_number: 'XXXXXXXX043' }`, or the guid list a list
67
+ * drawer shows (`{ transaction_guids: [...] }`).
68
+ */
64
69
  drilldown_data?: DrilldownData;
65
70
  footer?: Footer;
66
71
  /**
@@ -1 +1 @@
1
- {"version":3,"file":"Insights.es.js","names":[],"sources":["../../../src/core/types/Insights.ts"],"sourcesContent":["// ============ Core InsightsV2 Types ============\n\nimport { InsightsInstanceSlotData } from './InsightsInstanceSlotData'\n\nexport interface ThemedSVGImageProps {\n divProps?: React.HTMLAttributes<HTMLDivElement>\n image: React.ComponentType<React.SVGProps<SVGSVGElement>>\n isMini?: boolean\n}\n\n/**\n * Emitted by a block when the user drills into a specific datum (e.g. clicks a\n * chart bar). Named fields rather than positional args so blocks with differing\n * shapes can extend this without the call sites transposing values.\n */\nexport interface DrilldownPayload {\n chartBarIndex: number\n tabIndex?: number\n transaction_guid?: string\n block?: string\n}\n\n/**\n * Which envelope a beat was fetched with. `embedded` (the transaction-row pill + details-drawer\n * card) and `notification` are V2 additions; a surface asks for one with `widget_type=` on the fetch.\n */\nexport type WidgetType = 'full' | 'mini' | 'micro' | 'embedded' | 'notification'\n\n/**\n * V2: the transaction-row tag, its own small section of the `embedded` envelope (the same grammar\n * as `description` / `footer`, with room for a tone or an icon later). Omitted for an insight that\n * tags no transaction row. It deliberately is *not* `short_title`, which stays a per-variant\n * attribute with a second consumer (the bank-holiday sub-header).\n */\nexport interface Pill {\n text: string\n}\n\n/**\n * V2: facts a drilldown shows that the card does not (e.g. the account number for the Transaction\n * Details drawer). A flat hash shared by every CTA of the card, omitted when the insight has none.\n * Never carries copy or user actions (memo, tags, hide, flag come from the transaction store).\n */\nexport type DrilldownData = Record<string, string | number | boolean | null>\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 /** V2: drilldown-only facts, e.g. `{ account_number: 'XXXXXXXX043' }`. */\n drilldown_data?: DrilldownData\n footer?: Footer\n /**\n * V2: the link inside the description: on the full card a drawer of its own (Low Account\n * Balance's \"Transactions ›\"); on mini and micro the card's action, sent instead of `primary_cta`.\n * Absent when the beat has no link.\n */\n in_description_cta?: InDescriptionCTA\n guid: string\n user_guid: string\n client_guid?: string\n /** Template name, e.g. `LargeTransactionV2`. */\n template?: string\n revision?: number\n /** Unix seconds. */\n created_at?: number\n /** Unix seconds. */\n updated_at?: number\n /** Unix seconds. */\n active_at?: number\n displayed_at?: number | null\n dismissed_at: number | null\n cta_clicked_at?: number | null\n has_been_displayed?: boolean\n is_dismissed: boolean\n is_deleted?: boolean\n is_hidden_by_system?: boolean\n is_obsolete?: boolean\n is_refreshable?: boolean\n is_sampled?: boolean\n is_zero_state?: boolean\n status?: string | null\n /**\n * V2 (LargeTransactionV2 onward): the entities the beat is about, carried on the payload so\n * action blocks do not have to reach back out to the beat envelope.\n */\n primary_account_guid?: string | null\n primary_transaction_guid?: string | null\n primary_category_guid?: string | null\n primary_merchant_guid?: string | null\n /**\n * V2: the repeating transaction a subscription beat is about (Upcoming Subscription, Subscription\n * Price Increase). Read by `recurring_transaction_block`, see\n * `actionBlocks/RecurringTransactionBlock/subscriptionBeats.ts`.\n */\n primary_repeating_transaction_guid?: string | null\n}\n\nexport interface Legends {\n label: string\n value: number\n additional_value?: number\n additional_value_type?: string\n value_type?: string\n}\n\nexport interface Logo {\n category_guid?: string\n category_name?: string\n institution_guid?: string\n institution_name?: string\n logo_color?: string\n /** Draw the `logo_name` icon filled (V2 `ICO-` logos). */\n logo_fill?: boolean\n logo_name?: string\n merchant_guid?: string\n merchant_name?: string\n}\n\nexport interface Subtitle {\n logo?: Logo\n text: string\n}\n\n/**\n * A V2 logo, shared by the header (`InsightsPayload.logo`) and every instance-slot row. It takes\n * one of two shapes:\n *\n * - **Entity**: `guid`, whose prefix (`INS-` / `MCH-` / `CAT-`) picks the logo component, plus an\n * optional `fallback_guid` for when that component's asset cannot load. Today that is the\n * category behind an `MCH-` guid, which `MerchantLogo` shows as a tile when the merchant image\n * is missing.\n * - **Status icon**: `icon` (an mx-icons name, e.g. `warning`) and `color` (a theme palette path,\n * e.g. `error.main`), for subheaders that show a state rather than an entity (V1's\n * `logo_name` / `logo_color`).\n *\n * `alt` is the accessible name for either shape. A logo sends one shape; if it sends both, `icon`\n * wins, as `logo_name` does in V1's `SubHeader`.\n */\nexport interface LogoRef {\n alt?: string\n color?: string\n fallback_guid?: string\n guid?: string\n icon?: string\n}\n\nexport interface CategoryLogo {\n category_guid: string\n category_name: string\n}\n\nexport interface MerchantLogo {\n merchant_guid: string\n merchant_name: string\n}\n\nexport interface InstitutionLogo {\n institution_guid: string\n institution_name: string\n}\n\nexport interface Description {\n text: string\n html_text: string\n}\n\n/**\n * Post message a CTA press sends to the host, resolved by the backend for the beat's current\n * state. Absent/null = the backend has not described one: the frontend uses the template's\n * interim `ctaPostMessages` entry if there is one, else sends no message. `payload` carries only\n * beat-specific extras; the frontend always adds `beat_guid`, `beat_template`, `user_guid` and\n * `action_string`.\n */\nexport interface CtaPostMessageMetadata {\n /** Post message event; defaults to `beat/cta`. */\n event?: string | null\n /** Operation the host should perform, e.g. `op_1`, `op_2`, `op_3`. Defaults to `op_1`. */\n action?: string | null\n /** Beat-specific fields merged into the message metadata (account ids, amounts, ...). */\n payload?: Record<string, unknown> | null\n}\n\nexport interface PrimaryCTA {\n label: string\n block: string\n variant?: string | null\n /**\n * What pressing the CTA does beyond opening its block, named by the backend (ditto\n * `primary_cta_action`, passed through by tupac). Looked up in `insights-v2/ctaActions`;\n * null / absent / unknown means the CTA only opens its block or posts its message.\n */\n action_key?: string | null\n metadata?: CtaPostMessageMetadata | null\n}\n\nexport interface SecondaryCTA {\n label: string\n /**\n * Drawer block to open. `null` when the CTA opens nothing (ditto `secondary_cta_block: null`,\n * e.g. Fee Detected's \"Contact Support\"): the press posts its message to the host instead.\n */\n block: string | null\n variant?: string | null\n /** See `PrimaryCTA.action_key` (ditto `secondary_cta_action`). */\n action_key?: string | null\n metadata?: CtaPostMessageMetadata | null\n}\n\n/**\n * The description link: its label, the action block it opens and, like a CTA's, the variant that\n * tells that block what to show (ditto's `in_description_cta_variant`, e.g. `low_balance`). On mini\n * and micro it words the card's action; `block` is empty when that action opens no drawer.\n */\nexport interface InDescriptionCTA {\n label: string\n block?: string\n variant?: string | null\n action_key?: string | null\n}\n\nexport interface Footer {\n /** V1: a pre-formatted date string. */\n date?: string\n /**\n * The account label, on both V1 and V2. The backend resolves the plurality: one account sends\n * its name (e.g. `Epic Bank`), several send a localized count (e.g. `2 Accounts`), none sends\n * `null` (tupac's `footer_account_label` returns nil for a beat with no accounts, as Payday Cash\n * Left Over Status does). There is deliberately no separate `accounts` key.\n */\n account?: string | null\n /**\n * V2 (LargeTransactionV2 onward): unix seconds, formatted by `Footer` for display.\n * Replaces `date`; `date` wins when a beat somehow sends both.\n */\n timestamp?: number\n}\n\n// ============ Instance Slot Types ============\n// Values are the snake_case block names the backend sends on a beat's instance slot; the PascalCase\n// keys stay as friendly references (e.g. BlockType.BarChartBlock === 'bar_chart_block').\nexport const BlockType = {\n AccountBlock: 'account_block',\n AccountSwitchBlock: 'account_switch_block',\n BarChartBlock: 'bar_chart_block',\n BudgetBlock: 'budget_block',\n DirectDepositBlock: 'direct_deposit_block',\n ImageBlock: 'image_block',\n TransactionBlock: 'transaction_block',\n DonutChartBlock: 'donut_chart_block',\n DoubleBarChartBlock: 'double_bar_chart_block',\n DoubleProgressBarBlock: 'double_progress_bar_block',\n DebtsBlock: 'debts_block',\n RepeatingTransactionBlock: 'repeating_transaction_block',\n SaveExtraBlock: 'save_extra_block',\n SavingsOpportunityBlock: 'savings_opportunity_block',\n StepChartBlock: 'step_chart_block',\n SVGImageBlock: 'svg_image_block',\n UpcomingBillBlock: 'upcoming_bill_block',\n UpcomingSubscriptionBlock: 'upcoming_subscription_block',\n WithdrawalBlock: 'withdrawal_block',\n} as const\n\nexport type BlockType = (typeof BlockType)[keyof typeof BlockType]\n\n/**\n * A pre-localized row on a V2 instance slot. The backend resolves the copy and formatting; the\n * logo is a `LogoRef` (an entity guid or a status icon, see `logoFromRef`).\n */\nexport interface InstanceSlotRow {\n amount?: number\n logo?: LogoRef\n primary_text?: string\n secondary_text?: string\n}\n\n/**\n * V2: the slots a block's variant filled, keyed by slot name; ditto owns the names and omits any\n * slot it has no value for (`lib/ditto/blocks/<block>.yml`). Read with `slot()`, which names the\n * kind the caller expects.\n */\nexport interface InstanceSlotData {\n [slot: string]: unknown\n}\n\n/**\n * Reads one slot off a block's `data`; undefined when ditto did not fill it.\n *\n * The caller names the kind, because the slot's kind lives in the block's ditto schema and not\n * here — a block fills slots with whatever its card needs, so no fixed list of kinds would hold\n * (`account_switch_block` alone carries a boolean and `budget_block` a nested object).\n */\nexport const slot = <T = unknown>(\n data: InstanceSlotData | undefined,\n name: string,\n): T | undefined => data?.[name] as T | undefined\n\n/**\n * V2: which block renders this beat's content, and what it renders.\n *\n * `block` is optional: a beat whose template has no ditto config arrives as an empty `{}` and the\n * card renders its copy and CTAs alone, so a reader cannot assume a block is named. One interface\n * with `block` optional rather than a union with `Record<string, never>`, which TypeScript absorbs\n * — that union left `block` reading as required and typed a promise it did not keep.\n *\n * `variant` is optional for the same reason — the empty `{}` carries neither. Every ditto beat\n * file that names a block also names a variant, so a *filled* slot always has one; ditto drops a\n * nil variant rather than sending null, which is why the type is `string | null | undefined`.\n */\nexport interface InstanceSlot {\n block?: BlockType\n variant?: string | null\n /** The slots this block's variant declares in ditto. */\n data?: InstanceSlotData\n // Direct Deposit block (Set Up Direct Deposit, Switch Direct Deposit, Missing\n // Interest Rate): account facts carried flat on the slot, beside `data`.\n /** Primary line on the hero card, e.g. \"Epic Bank Checking, *1234\". */\n account_name?: string\n /** Secondary line beneath the name, e.g. \"Checking Account\" / \"Credit Card\". */\n account_type?: string\n /** Status pill label, e.g. \"Direct Deposit Not Set Up\" / \"Interest Rate: 19.99% APR\". */\n status_text?: string\n institution_guid?: string\n institution_name?: string\n // Shared across multiple V2 component blocks:\n // `amount` — UpcomingBillBlock (projected bill), SavingsOpportunityBlock (coupon),\n // UpcomingSubscriptionBlock (price per cadence).\n // `merchant_guid` / `merchant_name` — UpcomingBillBlock (bill row logo + name),\n // UpcomingSubscriptionBlock (hero logo + name).\n /** Dollar amount (unformatted); the block formats it as currency. */\n amount?: number\n /** Merchant guid used to render the inline / hero logo via `LogoFromGuid` (`MCH-...`). */\n merchant_guid?: string\n /** Merchant display name — shown as logo alt text and as the merchant/hero label. */\n merchant_name?: string\n // Upcoming Bill block (Projected Bill Payment): the block derives the Sun→Sat week strip\n // around `due_date` at render time.\n /** Due date of the projected bill in ISO form (e.g. `2025-10-30`). */\n due_date?: string\n // Savings Opportunity block (Save An Extra, Potential Savings, Embedded): purely data-driven\n // coupon card. Backend sends the caption and the amount, plus `slot` to toggle the green\n // gradient background when the card is embedded in a parent surface that supplies its own.\n /** Caption shown above the amount, e.g. `Save an extra` or `Potential savings`. */\n label?: string\n /**\n * Whether to render the green gradient slot behind the coupon. Defaults to true. Backend sends\n * `false` when the coupon is embedded in a parent surface that supplies its own background.\n */\n slot?: boolean\n // Upcoming Subscription block: billing cadence for the price pill (`${amount} / ${cadence}`).\n /** Billing cadence word that trails the price, e.g. `month` or `year`. */\n cadence?: string\n // Account block (status on/off-track, deposit, payoff variants): card content carried flat on\n // the slot (the V2 contract drops `instance_slot_data`). `amount`, `label`, `merchant_guid`,\n // `merchant_name`, `institution_guid`, `institution_name` are shared fields declared above.\n /** Secondary line beneath the amount on the standard card, e.g. \"Remaining after expenses\". */\n sub_text?: string\n /** Header bar text (standard card) or the colored category strip label (deposit cards). */\n header_text?: string\n /** Generic-tile icon name used when no merchant/institution logo is available. */\n icon_name?: string\n /** Category guid used to render the deposit-card logo fallback. */\n category_guid?: string\n // Debts block: `amount` is the current balance; the shared account/institution fields above.\n /** Projected payoff date in ISO form (e.g. `2027-03-01`); the block formats it as month + year. */\n payoff_date?: string\n /** Monthly payment toward the debt (unformatted); the block formats it as currency. */\n monthly_payment?: number\n /** Annual interest rate as a percentage (e.g. `19.99`); the block formats it as a percent. */\n interest_rate?: number\n}\n"],"mappings":"AAyTA,IAAa,IAAA,CACX,GACA,MACkB,IAAO,CAAA"}
1
+ {"version":3,"file":"Insights.es.js","names":[],"sources":["../../../src/core/types/Insights.ts"],"sourcesContent":["// ============ Core InsightsV2 Types ============\n\nimport { InsightsInstanceSlotData } from './InsightsInstanceSlotData'\n\nexport interface ThemedSVGImageProps {\n divProps?: React.HTMLAttributes<HTMLDivElement>\n image: React.ComponentType<React.SVGProps<SVGSVGElement>>\n isMini?: boolean\n}\n\n/**\n * Emitted by a block when the user drills into a specific datum (e.g. clicks a\n * chart bar). Named fields rather than positional args so blocks with differing\n * shapes can extend this without the call sites transposing values.\n */\nexport interface DrilldownPayload {\n chartBarIndex: number\n tabIndex?: number\n transaction_guid?: string\n block?: string\n}\n\n/**\n * Which envelope a beat was fetched with. `embedded` (the transaction-row pill + details-drawer\n * card) and `notification` are V2 additions; a surface asks for one with `widget_type=` on the fetch.\n */\nexport type WidgetType = 'full' | 'mini' | 'micro' | 'embedded' | 'notification'\n\n/**\n * V2: the transaction-row tag, its own small section of the `embedded` envelope (the same grammar\n * as `description` / `footer`, with room for a tone or an icon later). Omitted for an insight that\n * tags no transaction row. It deliberately is *not* `short_title`, which stays a per-variant\n * attribute with a second consumer (the bank-holiday sub-header).\n */\nexport interface Pill {\n text: string\n}\n\n/**\n * V2: facts a drilldown shows that the card does not (e.g. the account number for the Transaction\n * Details drawer), or the guid list a list drawer shows (`transaction_guids`). Scalars or string\n * lists, shared by every CTA of the card, omitted when the insight has none. Never carries copy or\n * user actions (memo, tags, hide, flag come from the transaction store). Values come from the\n * server, so a reader still checks each value's runtime shape.\n */\nexport type DrilldownData = Record<string, string | number | boolean | null | string[]>\n\nexport interface InsightsPayload {\n widget_type: WidgetType\n instance_slot: InstanceSlot\n /**\n * V1 only. The v2 contract carries everything a block needs on `instance_slot.data`,\n * and omits this key entirely (see the LargeTransactionV2 payload). Blocks that still require it\n * get it as a required field through `BlockProps`, which re-declares it.\n */\n instance_slot_data?: InsightsInstanceSlotData\n description: Description\n primary_cta?: PrimaryCTA\n secondary_cta?: SecondaryCTA\n title?: string\n sub_title?: Subtitle\n /**\n * V2 rename of `sub_title`: a flat string, with the logo promoted to the payload-level `logo`\n * field below. `sub_title` wins when both are present.\n */\n subtitle?: string\n /** V2: header logo paired with the flat `subtitle`: an entity guid or a status icon (`LogoRef`). */\n logo?: LogoRef\n /** V2: which design branch the backend picked (e.g. `no_merchant`). */\n variant?: string\n /** V2, `embedded` envelope only: the transaction-row pill. */\n pill?: Pill\n /**\n * V2: drilldown-only facts, e.g. `{ account_number: 'XXXXXXXX043' }`, or the guid list a list\n * drawer shows (`{ transaction_guids: [...] }`).\n */\n drilldown_data?: DrilldownData\n footer?: Footer\n /**\n * V2: the link inside the description: on the full card a drawer of its own (Low Account\n * Balance's \"Transactions ›\"); on mini and micro the card's action, sent instead of `primary_cta`.\n * Absent when the beat has no link.\n */\n in_description_cta?: InDescriptionCTA\n guid: string\n user_guid: string\n client_guid?: string\n /** Template name, e.g. `LargeTransactionV2`. */\n template?: string\n revision?: number\n /** Unix seconds. */\n created_at?: number\n /** Unix seconds. */\n updated_at?: number\n /** Unix seconds. */\n active_at?: number\n displayed_at?: number | null\n dismissed_at: number | null\n cta_clicked_at?: number | null\n has_been_displayed?: boolean\n is_dismissed: boolean\n is_deleted?: boolean\n is_hidden_by_system?: boolean\n is_obsolete?: boolean\n is_refreshable?: boolean\n is_sampled?: boolean\n is_zero_state?: boolean\n status?: string | null\n /**\n * V2 (LargeTransactionV2 onward): the entities the beat is about, carried on the payload so\n * action blocks do not have to reach back out to the beat envelope.\n */\n primary_account_guid?: string | null\n primary_transaction_guid?: string | null\n primary_category_guid?: string | null\n primary_merchant_guid?: string | null\n /**\n * V2: the repeating transaction a subscription beat is about (Upcoming Subscription, Subscription\n * Price Increase). Read by `recurring_transaction_block`, see\n * `actionBlocks/RecurringTransactionBlock/subscriptionBeats.ts`.\n */\n primary_repeating_transaction_guid?: string | null\n}\n\nexport interface Legends {\n label: string\n value: number\n additional_value?: number\n additional_value_type?: string\n value_type?: string\n}\n\nexport interface Logo {\n category_guid?: string\n category_name?: string\n institution_guid?: string\n institution_name?: string\n logo_color?: string\n /** Draw the `logo_name` icon filled (V2 `ICO-` logos). */\n logo_fill?: boolean\n logo_name?: string\n merchant_guid?: string\n merchant_name?: string\n}\n\nexport interface Subtitle {\n logo?: Logo\n text: string\n}\n\n/**\n * A V2 logo, shared by the header (`InsightsPayload.logo`) and every instance-slot row. It takes\n * one of two shapes:\n *\n * - **Entity**: `guid`, whose prefix (`INS-` / `MCH-` / `CAT-`) picks the logo component, plus an\n * optional `fallback_guid` for when that component's asset cannot load. Today that is the\n * category behind an `MCH-` guid, which `MerchantLogo` shows as a tile when the merchant image\n * is missing.\n * - **Status icon**: `icon` (an mx-icons name, e.g. `warning`) and `color` (a theme palette path,\n * e.g. `error.main`), for subheaders that show a state rather than an entity (V1's\n * `logo_name` / `logo_color`).\n *\n * `alt` is the accessible name for either shape. A logo sends one shape; if it sends both, `icon`\n * wins, as `logo_name` does in V1's `SubHeader`.\n */\nexport interface LogoRef {\n alt?: string\n color?: string\n fallback_guid?: string\n guid?: string\n icon?: string\n}\n\nexport interface CategoryLogo {\n category_guid: string\n category_name: string\n}\n\nexport interface MerchantLogo {\n merchant_guid: string\n merchant_name: string\n}\n\nexport interface InstitutionLogo {\n institution_guid: string\n institution_name: string\n}\n\nexport interface Description {\n text: string\n html_text: string\n}\n\n/**\n * Post message a CTA press sends to the host, resolved by the backend for the beat's current\n * state. Absent/null = the backend has not described one: the frontend uses the template's\n * interim `ctaPostMessages` entry if there is one, else sends no message. `payload` carries only\n * beat-specific extras; the frontend always adds `beat_guid`, `beat_template`, `user_guid` and\n * `action_string`.\n */\nexport interface CtaPostMessageMetadata {\n /** Post message event; defaults to `beat/cta`. */\n event?: string | null\n /** Operation the host should perform, e.g. `op_1`, `op_2`, `op_3`. Defaults to `op_1`. */\n action?: string | null\n /** Beat-specific fields merged into the message metadata (account ids, amounts, ...). */\n payload?: Record<string, unknown> | null\n}\n\nexport interface PrimaryCTA {\n label: string\n block: string\n variant?: string | null\n /**\n * What pressing the CTA does beyond opening its block, named by the backend (ditto\n * `primary_cta_action`, passed through by tupac). Looked up in `insights-v2/ctaActions`;\n * null / absent / unknown means the CTA only opens its block or posts its message.\n */\n action_key?: string | null\n metadata?: CtaPostMessageMetadata | null\n}\n\nexport interface SecondaryCTA {\n label: string\n /**\n * Drawer block to open. `null` when the CTA opens nothing (ditto `secondary_cta_block: null`,\n * e.g. Fee Detected's \"Contact Support\"): the press posts its message to the host instead.\n */\n block: string | null\n variant?: string | null\n /** See `PrimaryCTA.action_key` (ditto `secondary_cta_action`). */\n action_key?: string | null\n metadata?: CtaPostMessageMetadata | null\n}\n\n/**\n * The description link: its label, the action block it opens and, like a CTA's, the variant that\n * tells that block what to show (ditto's `in_description_cta_variant`, e.g. `low_balance`). On mini\n * and micro it words the card's action; `block` is empty when that action opens no drawer.\n */\nexport interface InDescriptionCTA {\n label: string\n block?: string\n variant?: string | null\n action_key?: string | null\n}\n\nexport interface Footer {\n /** V1: a pre-formatted date string. */\n date?: string\n /**\n * The account label, on both V1 and V2. The backend resolves the plurality: one account sends\n * its name (e.g. `Epic Bank`), several send a localized count (e.g. `2 Accounts`), none sends\n * `null` (tupac's `footer_account_label` returns nil for a beat with no accounts, as Payday Cash\n * Left Over Status does). There is deliberately no separate `accounts` key.\n */\n account?: string | null\n /**\n * V2 (LargeTransactionV2 onward): unix seconds, formatted by `Footer` for display.\n * Replaces `date`; `date` wins when a beat somehow sends both.\n */\n timestamp?: number\n}\n\n// ============ Instance Slot Types ============\n// Values are the snake_case block names the backend sends on a beat's instance slot; the PascalCase\n// keys stay as friendly references (e.g. BlockType.BarChartBlock === 'bar_chart_block').\nexport const BlockType = {\n AccountBlock: 'account_block',\n AccountSwitchBlock: 'account_switch_block',\n BarChartBlock: 'bar_chart_block',\n BudgetBlock: 'budget_block',\n DirectDepositBlock: 'direct_deposit_block',\n ImageBlock: 'image_block',\n TransactionBlock: 'transaction_block',\n DonutChartBlock: 'donut_chart_block',\n DoubleBarChartBlock: 'double_bar_chart_block',\n DoubleProgressBarBlock: 'double_progress_bar_block',\n DebtsBlock: 'debts_block',\n RepeatingTransactionBlock: 'repeating_transaction_block',\n SaveExtraBlock: 'save_extra_block',\n SavingsOpportunityBlock: 'savings_opportunity_block',\n StepChartBlock: 'step_chart_block',\n SVGImageBlock: 'svg_image_block',\n UpcomingBillBlock: 'upcoming_bill_block',\n UpcomingSubscriptionBlock: 'upcoming_subscription_block',\n WithdrawalBlock: 'withdrawal_block',\n} as const\n\nexport type BlockType = (typeof BlockType)[keyof typeof BlockType]\n\n/**\n * A pre-localized row on a V2 instance slot. The backend resolves the copy and formatting; the\n * logo is a `LogoRef` (an entity guid or a status icon, see `logoFromRef`).\n */\nexport interface InstanceSlotRow {\n amount?: number\n logo?: LogoRef\n primary_text?: string\n secondary_text?: string\n}\n\n/**\n * V2: the slots a block's variant filled, keyed by slot name; ditto owns the names and omits any\n * slot it has no value for (`lib/ditto/blocks/<block>.yml`). Read with `slot()`, which names the\n * kind the caller expects.\n */\nexport interface InstanceSlotData {\n [slot: string]: unknown\n}\n\n/**\n * Reads one slot off a block's `data`; undefined when ditto did not fill it.\n *\n * The caller names the kind, because the slot's kind lives in the block's ditto schema and not\n * here — a block fills slots with whatever its card needs, so no fixed list of kinds would hold\n * (`account_switch_block` alone carries a boolean and `budget_block` a nested object).\n */\nexport const slot = <T = unknown>(\n data: InstanceSlotData | undefined,\n name: string,\n): T | undefined => data?.[name] as T | undefined\n\n/**\n * V2: which block renders this beat's content, and what it renders.\n *\n * `block` is optional: a beat whose template has no ditto config arrives as an empty `{}` and the\n * card renders its copy and CTAs alone, so a reader cannot assume a block is named. One interface\n * with `block` optional rather than a union with `Record<string, never>`, which TypeScript absorbs\n * — that union left `block` reading as required and typed a promise it did not keep.\n *\n * `variant` is optional for the same reason — the empty `{}` carries neither. Every ditto beat\n * file that names a block also names a variant, so a *filled* slot always has one; ditto drops a\n * nil variant rather than sending null, which is why the type is `string | null | undefined`.\n */\nexport interface InstanceSlot {\n block?: BlockType\n variant?: string | null\n /** The slots this block's variant declares in ditto. */\n data?: InstanceSlotData\n // Direct Deposit block (Set Up Direct Deposit, Switch Direct Deposit, Missing\n // Interest Rate): account facts carried flat on the slot, beside `data`.\n /** Primary line on the hero card, e.g. \"Epic Bank Checking, *1234\". */\n account_name?: string\n /** Secondary line beneath the name, e.g. \"Checking Account\" / \"Credit Card\". */\n account_type?: string\n /** Status pill label, e.g. \"Direct Deposit Not Set Up\" / \"Interest Rate: 19.99% APR\". */\n status_text?: string\n institution_guid?: string\n institution_name?: string\n // Shared across multiple V2 component blocks:\n // `amount` — UpcomingBillBlock (projected bill), SavingsOpportunityBlock (coupon),\n // UpcomingSubscriptionBlock (price per cadence).\n // `merchant_guid` / `merchant_name` — UpcomingBillBlock (bill row logo + name),\n // UpcomingSubscriptionBlock (hero logo + name).\n /** Dollar amount (unformatted); the block formats it as currency. */\n amount?: number\n /** Merchant guid used to render the inline / hero logo via `LogoFromGuid` (`MCH-...`). */\n merchant_guid?: string\n /** Merchant display name — shown as logo alt text and as the merchant/hero label. */\n merchant_name?: string\n // Upcoming Bill block (Projected Bill Payment): the block derives the Sun→Sat week strip\n // around `due_date` at render time.\n /** Due date of the projected bill in ISO form (e.g. `2025-10-30`). */\n due_date?: string\n // Savings Opportunity block (Save An Extra, Potential Savings, Embedded): purely data-driven\n // coupon card. Backend sends the caption and the amount, plus `slot` to toggle the green\n // gradient background when the card is embedded in a parent surface that supplies its own.\n /** Caption shown above the amount, e.g. `Save an extra` or `Potential savings`. */\n label?: string\n /**\n * Whether to render the green gradient slot behind the coupon. Defaults to true. Backend sends\n * `false` when the coupon is embedded in a parent surface that supplies its own background.\n */\n slot?: boolean\n // Upcoming Subscription block: billing cadence for the price pill (`${amount} / ${cadence}`).\n /** Billing cadence word that trails the price, e.g. `month` or `year`. */\n cadence?: string\n // Account block (status on/off-track, deposit, payoff variants): card content carried flat on\n // the slot (the V2 contract drops `instance_slot_data`). `amount`, `label`, `merchant_guid`,\n // `merchant_name`, `institution_guid`, `institution_name` are shared fields declared above.\n /** Secondary line beneath the amount on the standard card, e.g. \"Remaining after expenses\". */\n sub_text?: string\n /** Header bar text (standard card) or the colored category strip label (deposit cards). */\n header_text?: string\n /** Generic-tile icon name used when no merchant/institution logo is available. */\n icon_name?: string\n /** Category guid used to render the deposit-card logo fallback. */\n category_guid?: string\n // Debts block: `amount` is the current balance; the shared account/institution fields above.\n /** Projected payoff date in ISO form (e.g. `2027-03-01`); the block formats it as month + year. */\n payoff_date?: string\n /** Monthly payment toward the debt (unformatted); the block formats it as currency. */\n monthly_payment?: number\n /** Annual interest rate as a percentage (e.g. `19.99`); the block formats it as a percent. */\n interest_rate?: number\n}\n"],"mappings":"AA8TA,IAAa,IAAA,CACX,GACA,MACkB,IAAO,CAAA"}
@@ -1,5 +1,5 @@
1
1
  import { DataSeries, Legends } from '../../core';
2
- export interface InsightsInstanceSlotData extends Partial<BudgetBlockData>, Partial<DonutChartBlockData>, Partial<DoubleProgressBarBlockData>, Partial<ImageBlockData>, Partial<AccountBlockData>, Partial<SaveExtraBlockData>, Partial<StepChartBlockData>, Partial<SVGImageBlockData>, Partial<AccountSwitchBlockData>, Partial<TransactionDetailsBlockData>, Partial<CommonProps> {
2
+ export interface InsightsInstanceSlotData extends Partial<BudgetBlockData>, Partial<DonutChartBlockData>, Partial<ImageBlockData>, Partial<AccountBlockData>, Partial<SaveExtraBlockData>, Partial<StepChartBlockData>, Partial<SVGImageBlockData>, Partial<AccountSwitchBlockData>, Partial<TransactionDetailsBlockData>, Partial<CommonProps> {
3
3
  }
4
4
  interface CommonProps {
5
5
  amount?: number;
@@ -42,16 +42,6 @@ export interface DataSet extends DataSeries {
42
42
  label: string;
43
43
  main: number;
44
44
  }
45
- interface DoubleProgressBarProps {
46
- label: string;
47
- value: number;
48
- }
49
- export interface DoubleProgressBarBlockData {
50
- doubleProgressBar: {
51
- previous: DoubleProgressBarProps;
52
- latest: DoubleProgressBarProps;
53
- };
54
- }
55
45
  export interface ImageBlockData {
56
46
  image: string;
57
47
  }
@@ -1 +1 @@
1
- {"version":3,"file":"InsightsInstanceSlotData.es.js","names":[],"sources":["../../../src/core/types/InsightsInstanceSlotData.ts"],"sourcesContent":["import type { DataSeries, Legends } from '../../core'\n\nexport interface InsightsInstanceSlotData\n extends\n Partial<BudgetBlockData>,\n Partial<DonutChartBlockData>,\n Partial<DoubleProgressBarBlockData>,\n Partial<ImageBlockData>,\n Partial<AccountBlockData>,\n Partial<SaveExtraBlockData>,\n Partial<StepChartBlockData>,\n Partial<SVGImageBlockData>,\n Partial<AccountSwitchBlockData>,\n Partial<TransactionDetailsBlockData>,\n Partial<CommonProps> {}\n\n//when any of the type is used more than one times, we can use the common props\ninterface CommonProps {\n amount?: number\n ariaLabel?: string\n date?: string\n legends?: Legends[]\n category_guid?: string\n data_series?: DataSeries | DataSet[]\n transaction_guids?: string[]\n account_guids?: string[]\n primary_transaction_guid?: string\n}\n\n//BarChart Block: `instance_slot.data` (Insights 2.0)\nexport interface BarChartBlockData {\n series?: DataSeries\n category_guid?: string\n average_amount?: number\n /** [0] monthly amount, [1] trend. */\n additional_data?: Legends[]\n}\n\n//DonutChart Block\ninterface Main {\n value: string\n value_type: string\n label: string\n}\nexport interface DonutChartBlockData {\n main: Main\n}\n\n//DoubleBarChart Block\n// TODO : This has to be revisited again to update the below types based on API response once we have the final shape of the data_series for double bar chart from BE\nexport interface LegendProps extends Legends {\n amount: number\n formattedAmount: string\n label: string\n color?: string\n}\n\nexport interface DataSet extends DataSeries {\n ariaLabelComparison: string\n ariaLabelMain: string\n comparison: number\n formattedComparison: string\n formattedMain: string\n label: string\n main: number\n}\n\n//DoubleProgressBar Block\n\ninterface DoubleProgressBarProps {\n label: string\n value: number\n}\nexport interface DoubleProgressBarBlockData {\n doubleProgressBar: {\n previous: DoubleProgressBarProps\n latest: DoubleProgressBarProps\n }\n}\n\n//Image Block\nexport interface ImageBlockData {\n image: string\n}\n\n//Account Block\nexport interface AccountBlockData {\n sub_text: string\n institution_guid?: string\n institution_name?: string\n icon_name?: string\n /** Header bar text (standard card), or the colored category strip label (deposit cards). */\n header_text?: string\n // Deposit variants (Unified Deposit, Unified Deposit Emergency Fund, Savings Account Deposit)\n /** Merchant guid — renders a real merchant logo in the deposit card when present. */\n merchant_guid?: string\n /** Merchant display name — logo alt text and the payer line under the amount. */\n merchant_name?: string\n /** Secondary label beside the amount, e.g. `On {date}, you saved` or `Balance as of MM/DD/YY`. */\n label?: string\n}\n\nexport interface SaveExtraBlockData {\n /** Styled segments `[lead-in, amount digits, trailing copy]`, e.g. `['Save an extra', '100', 'to help your funds grow']`. */\n primary_text?: string[]\n /** Styled segments `[projected balance, caption]`, e.g. `['$8,313.87', 'After payday & projected expenses']`. */\n secondary_text?: string[]\n /** MakeTransfer drilldown: available balance (both variants). */\n available_balance?: number\n /** SAVE_ENOUGH_TO_LIVE_ON: average monthly spend. */\n avg_monthly_spend?: number\n /** SAVE_ENOUGH_TO_LIVE_ON: how long the balance lasts, overlaid on the timeline SVG (e.g. \"2 months, 11 days\"). */\n time_period?: string\n /** SAVE_AN_EXTRA_100: upcoming expenses (the \"Expenses\" figure). */\n upcoming_expenses?: number\n /** SAVE_AN_EXTRA_100: total remaining after expenses. */\n total_remaining?: number\n /** SAVE_ENOUGH_TO_LIVE_ON: date for the \"Your available balances as of {date}\" line. */\n date?: string\n}\n\n// AccountSwitch Block. State comes from `instance_slot.variant`, not a data flag.\nexport interface AccountSwitchBlockData {\n discovered_institution_guid: string\n discovered_institution_name: string\n held_institution_guid: string\n held_institution_name: string\n}\n\n// StepChart Block\nexport interface StepChartBlockData {\n completed_steps: number\n label_1: string\n label_2?: string\n}\n\n//Budgets Blocks\nexport enum BudgetTierType {\n LOW_BUDGET_TIER = 'LOW',\n MEDIUM_BUDGET_TIER = 'MEDIUM',\n OFF_TRACK_BUDGET_TIER = 'OFF_TRACK',\n}\n\nexport type BudgetTierValue = `${BudgetTierType}`\n\nexport interface BudgetLocalizedPayload {\n primary_text?: string\n amount_left_label?: string\n spent_label?: string\n budgeted_label?: string\n}\n\nexport interface BudgetBlockData {\n budget_percent: number\n budget_tier: BudgetTierValue\n category_guid?: string\n merchant_guid?: string\n spent_amount: number\n budgeted_amount: number\n localized_payload: BudgetLocalizedPayload\n}\n\nexport interface SVGImageBlockData {\n isCIBC?: boolean\n}\n\n// TransactionDetails Action Block\n// The drawer's subject is `InsightsPayload.primary_transaction_guid`; only action configuration\n// lives here.\nexport interface TransactionDetailsBlockData {\n /** `TopActions` member names, e.g. `['Category', 'Date', 'Memo']`. Omit for the defaults. */\n top_actions?: string[]\n /** `BottomActions` member names, e.g. `['MerchantBudget', 'HideTransaction']`. Omit for defaults. */\n bottom_actions?: string[]\n}\n"],"mappings":"AAyIA,IAAY,IAAL,0BAAA,GAAA;AACL,SAAA,EAAA,kBAAA,OACA,EAAA,qBAAA,UACA,EAAA,wBAAA;AACF,GAAA,CAAA,CAAA"}
1
+ {"version":3,"file":"InsightsInstanceSlotData.es.js","names":[],"sources":["../../../src/core/types/InsightsInstanceSlotData.ts"],"sourcesContent":["import type { DataSeries, Legends } from '../../core'\n\nexport interface InsightsInstanceSlotData\n extends\n Partial<BudgetBlockData>,\n Partial<DonutChartBlockData>,\n Partial<ImageBlockData>,\n Partial<AccountBlockData>,\n Partial<SaveExtraBlockData>,\n Partial<StepChartBlockData>,\n Partial<SVGImageBlockData>,\n Partial<AccountSwitchBlockData>,\n Partial<TransactionDetailsBlockData>,\n Partial<CommonProps> {}\n\n//when any of the type is used more than one times, we can use the common props\ninterface CommonProps {\n amount?: number\n ariaLabel?: string\n date?: string\n legends?: Legends[]\n category_guid?: string\n data_series?: DataSeries | DataSet[]\n transaction_guids?: string[]\n account_guids?: string[]\n primary_transaction_guid?: string\n}\n\n//BarChart Block: `instance_slot.data` (Insights 2.0)\nexport interface BarChartBlockData {\n series?: DataSeries\n category_guid?: string\n average_amount?: number\n /** [0] monthly amount, [1] trend. */\n additional_data?: Legends[]\n}\n\n//DonutChart Block\ninterface Main {\n value: string\n value_type: string\n label: string\n}\nexport interface DonutChartBlockData {\n main: Main\n}\n\n//DoubleBarChart Block\n// TODO : This has to be revisited again to update the below types based on API response once we have the final shape of the data_series for double bar chart from BE\nexport interface LegendProps extends Legends {\n amount: number\n formattedAmount: string\n label: string\n color?: string\n}\n\nexport interface DataSet extends DataSeries {\n ariaLabelComparison: string\n ariaLabelMain: string\n comparison: number\n formattedComparison: string\n formattedMain: string\n label: string\n main: number\n}\n\n//DoubleProgressBar Block\n\n//Image Block\nexport interface ImageBlockData {\n image: string\n}\n\n//Account Block\nexport interface AccountBlockData {\n sub_text: string\n institution_guid?: string\n institution_name?: string\n icon_name?: string\n /** Header bar text (standard card), or the colored category strip label (deposit cards). */\n header_text?: string\n // Deposit variants (Unified Deposit, Unified Deposit Emergency Fund, Savings Account Deposit)\n /** Merchant guid — renders a real merchant logo in the deposit card when present. */\n merchant_guid?: string\n /** Merchant display name — logo alt text and the payer line under the amount. */\n merchant_name?: string\n /** Secondary label beside the amount, e.g. `On {date}, you saved` or `Balance as of MM/DD/YY`. */\n label?: string\n}\n\nexport interface SaveExtraBlockData {\n /** Styled segments `[lead-in, amount digits, trailing copy]`, e.g. `['Save an extra', '100', 'to help your funds grow']`. */\n primary_text?: string[]\n /** Styled segments `[projected balance, caption]`, e.g. `['$8,313.87', 'After payday & projected expenses']`. */\n secondary_text?: string[]\n /** MakeTransfer drilldown: available balance (both variants). */\n available_balance?: number\n /** SAVE_ENOUGH_TO_LIVE_ON: average monthly spend. */\n avg_monthly_spend?: number\n /** SAVE_ENOUGH_TO_LIVE_ON: how long the balance lasts, overlaid on the timeline SVG (e.g. \"2 months, 11 days\"). */\n time_period?: string\n /** SAVE_AN_EXTRA_100: upcoming expenses (the \"Expenses\" figure). */\n upcoming_expenses?: number\n /** SAVE_AN_EXTRA_100: total remaining after expenses. */\n total_remaining?: number\n /** SAVE_ENOUGH_TO_LIVE_ON: date for the \"Your available balances as of {date}\" line. */\n date?: string\n}\n\n// AccountSwitch Block. State comes from `instance_slot.variant`, not a data flag.\nexport interface AccountSwitchBlockData {\n discovered_institution_guid: string\n discovered_institution_name: string\n held_institution_guid: string\n held_institution_name: string\n}\n\n// StepChart Block\nexport interface StepChartBlockData {\n completed_steps: number\n label_1: string\n label_2?: string\n}\n\n//Budgets Blocks\nexport enum BudgetTierType {\n LOW_BUDGET_TIER = 'LOW',\n MEDIUM_BUDGET_TIER = 'MEDIUM',\n OFF_TRACK_BUDGET_TIER = 'OFF_TRACK',\n}\n\nexport type BudgetTierValue = `${BudgetTierType}`\n\nexport interface BudgetLocalizedPayload {\n primary_text?: string\n amount_left_label?: string\n spent_label?: string\n budgeted_label?: string\n}\n\nexport interface BudgetBlockData {\n budget_percent: number\n budget_tier: BudgetTierValue\n category_guid?: string\n merchant_guid?: string\n spent_amount: number\n budgeted_amount: number\n localized_payload: BudgetLocalizedPayload\n}\n\nexport interface SVGImageBlockData {\n isCIBC?: boolean\n}\n\n// TransactionDetails Action Block\n// The drawer's subject is `InsightsPayload.primary_transaction_guid`; only action configuration\n// lives here.\nexport interface TransactionDetailsBlockData {\n /** `TopActions` member names, e.g. `['Category', 'Date', 'Memo']`. Omit for the defaults. */\n top_actions?: string[]\n /** `BottomActions` member names, e.g. `['MerchantBudget', 'HideTransaction']`. Omit for defaults. */\n bottom_actions?: string[]\n}\n"],"mappings":"AA6HA,IAAY,IAAL,0BAAA,GAAA;AACL,SAAA,EAAA,kBAAA,OACA,EAAA,qBAAA,UACA,EAAA,wBAAA;AACF,GAAA,CAAA,CAAA"}
@@ -24,6 +24,11 @@ interface TransactionDetailsBlockState {
24
24
  * A guid the store does not have resolves to `undefined` (the block's error state) rather than to
25
25
  * any beat-level snapshot, so inline edits can never be made against a stale copy.
26
26
  *
27
+ * An edit made here (category, date, memo...) replaces the transaction in the store. The beat's card
28
+ * is built from live data (a sampled beat's count), so the host is told the beat is stale, the same
29
+ * signal a CTA's `refreshBeat` effect sends; pulse refetches the sample on it, as its legacy cards do
30
+ * through `shouldUpdateOnTransactionChange`.
31
+ *
27
32
  * Actions are not beat-configurable on the v2 contract: `instance_slot_data` is not part of it (the
28
33
  * LargeTransactionV2 payload omits the key entirely), so top actions are always the defaults and
29
34
  * bottom actions are derived from the triggering CTA's variant.
@@ -1,17 +1,33 @@
1
- import { useActionContext as d, useInsightsV2Store as p, useTransactionStore as m } from "../../../common/context/hooks.es.js";
2
- import { getBottomActionsByVariant as u } from "./util.es.js";
3
- import { resolveTopActions as g } from "./transactionDetailsActions.es.js";
4
- var A = (i) => {
5
- const { detailedTransactions: n, isTransactionDataLoaded: a } = m(), { actionDrawer: s } = p(), { transaction_guid: r } = d() ?? {}, t = i.insights_payload, o = r ?? t?.primary_transaction_guid, c = o ? n.find((e) => e.guid === o) : void 0;
6
- return {
7
- bottomActions: u(s, t?.primary_cta, t?.secondary_cta, t?.in_description_cta),
8
- isLoading: !a,
9
- topActions: g(),
10
- transaction: c
1
+ import { useActionContext as _, useGlobalStore as y, useInsightsV2Store as h, useTransactionStore as v } from "../../../common/context/hooks.es.js";
2
+ import { getBottomActionsByVariant as A } from "./util.es.js";
3
+ import { resolveTopActions as T } from "./transactionDetailsActions.es.js";
4
+ import e from "react";
5
+ var E = (r) => {
6
+ const { detailedTransactions: d, isTransactionDataLoaded: u, transactions: p } = v(), { emitUpdate: a } = y(), { actionDrawer: g } = h(), { transaction_guid: m } = _() ?? {}, i = r.insights_payload, t = m ?? i?.primary_transaction_guid, f = t ? d.find((n) => n.guid === t) : void 0, c = t ? p.find((n) => n.guid === t) : void 0, o = c ? JSON.stringify(c) : void 0, s = e.useRef({
7
+ guid: t,
8
+ snapshot: o
9
+ });
10
+ return e.useEffect(() => {
11
+ if (!o) return;
12
+ const n = s.current.guid === t && s.current.snapshot !== void 0, l = s.current.snapshot !== o;
13
+ s.current = {
14
+ guid: t,
15
+ snapshot: o
16
+ }, n && l && a({ staleBeatGuid: r.guid });
17
+ }, [
18
+ t,
19
+ o,
20
+ r.guid,
21
+ a
22
+ ]), {
23
+ bottomActions: A(g, i?.primary_cta, i?.secondary_cta, i?.in_description_cta),
24
+ isLoading: !u,
25
+ topActions: T(),
26
+ transaction: f
11
27
  };
12
28
  };
13
29
  export {
14
- A as useTransactionDetailsBlock
30
+ E as useTransactionDetailsBlock
15
31
  };
16
32
 
17
33
  //# sourceMappingURL=useTransactionDetailsBlock.es.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"useTransactionDetailsBlock.es.js","names":[],"sources":["../../../../src/insights-v2/actionBlocks/TransactionDetailsBlock/useTransactionDetailsBlock.ts"],"sourcesContent":["import { useActionContext, useInsightsV2Store, useTransactionStore } from '../../../common'\nimport type { Beat, Transaction, DrilldownPayload } from '../../../core'\nimport type { BottomActions, TopActions } from '../../../transactions/constants/Actions'\nimport { getBottomActionsByVariant } from './util'\nimport { resolveTopActions } from './transactionDetailsActions'\n\ninterface TransactionDetailsBlockState {\n bottomActions: BottomActions[]\n /** True while the store is still loading; the block shows a loader instead of an empty state. */\n isLoading: boolean\n topActions: TopActions[]\n /** `undefined` once loading finishes means the transaction could not be resolved. */\n transaction?: Transaction\n}\n\n/**\n * Resolves which transaction this drawer is about, and which inline actions it offers.\n *\n * The subject comes from one of two places:\n * 1. `actionContext.transaction_guid` — set by a parent drawer (e.g. a row tapped in\n * `TransactionHistoryBlock`) when this drawer is opened nested.\n * 2. `insights_payload.primary_transaction_guid` — the ditto contract for every beat whose\n * `primary_cta_block` is `transaction_details_block`.\n *\n * The guid is then looked up in `transactionStore.detailedTransactions` rather than used directly,\n * because `TransactionDetails` needs the *detailed* shape (account + category + taggings joined in)\n * and edits must write through to the same store object the rest of the app renders. `buildDetailed\n * Transactions` inside the store is this repo's equivalent of pulse's `buildTransactionDetails`.\n * A guid the store does not have resolves to `undefined` (the block's error state) rather than to\n * any beat-level snapshot, so inline edits can never be made against a stale copy.\n *\n * Actions are not beat-configurable on the v2 contract: `instance_slot_data` is not part of it (the\n * LargeTransactionV2 payload omits the key entirely), so top actions are always the defaults and\n * bottom actions are derived from the triggering CTA's variant.\n */\nexport const useTransactionDetailsBlock = (beat: Beat): TransactionDetailsBlockState => {\n const { detailedTransactions, isTransactionDataLoaded } = useTransactionStore()\n\n const { actionDrawer } = useInsightsV2Store()\n\n const { transaction_guid } = useActionContext<DrilldownPayload>() ?? {}\n const payload = beat.insights_payload\n\n const guid = transaction_guid ?? payload?.primary_transaction_guid\n\n const transaction = guid\n ? detailedTransactions.find((transaction) => transaction.guid === guid)\n : undefined\n\n const bottomActions = getBottomActionsByVariant(\n actionDrawer,\n payload?.primary_cta,\n payload?.secondary_cta,\n payload?.in_description_cta,\n )\n return {\n bottomActions,\n isLoading: !isTransactionDataLoaded,\n topActions: resolveTopActions(),\n transaction,\n }\n}\n"],"mappings":";;;AAmCA,IAAa,IAAA,CAA8B,MAA6C;AACtF,QAAM,EAAE,sBAAA,GAAsB,yBAAA,EAAA,IAA4B,EAAoB,GAExE,EAAE,cAAA,EAAA,IAAiB,EAAmB,GAEtC,EAAE,kBAAA,EAAA,IAAqB,EAAmC,KAAK,CAAC,GAChE,IAAU,EAAK,kBAEf,IAAO,KAAoB,GAAS,0BAEpC,IAAc,IAChB,EAAqB,KAAA,CAAM,MAAgB,EAAY,SAAS,CAAI,IACpE;AAQJ,SAAO;AAAA,IACL,eAPoB,EACpB,GACA,GAAS,aACT,GAAS,eACT,GAAS,kBAGT;AAAA,IACA,WAAW,CAAC;AAAA,IACZ,YAAY,EAAkB;AAAA,IAC9B,aAAA;AAAA,EACF;AACF"}
1
+ {"version":3,"file":"useTransactionDetailsBlock.es.js","names":[],"sources":["../../../../src/insights-v2/actionBlocks/TransactionDetailsBlock/useTransactionDetailsBlock.ts"],"sourcesContent":["import React from 'react'\n\nimport {\n useActionContext,\n useGlobalStore,\n useInsightsV2Store,\n useTransactionStore,\n} from '../../../common'\nimport type { Beat, Transaction, DrilldownPayload } from '../../../core'\nimport type { BottomActions, TopActions } from '../../../transactions/constants/Actions'\nimport { getBottomActionsByVariant } from './util'\nimport { resolveTopActions } from './transactionDetailsActions'\n\ninterface TransactionDetailsBlockState {\n bottomActions: BottomActions[]\n /** True while the store is still loading; the block shows a loader instead of an empty state. */\n isLoading: boolean\n topActions: TopActions[]\n /** `undefined` once loading finishes means the transaction could not be resolved. */\n transaction?: Transaction\n}\n\n/**\n * Resolves which transaction this drawer is about, and which inline actions it offers.\n *\n * The subject comes from one of two places:\n * 1. `actionContext.transaction_guid` — set by a parent drawer (e.g. a row tapped in\n * `TransactionHistoryBlock`) when this drawer is opened nested.\n * 2. `insights_payload.primary_transaction_guid` — the ditto contract for every beat whose\n * `primary_cta_block` is `transaction_details_block`.\n *\n * The guid is then looked up in `transactionStore.detailedTransactions` rather than used directly,\n * because `TransactionDetails` needs the *detailed* shape (account + category + taggings joined in)\n * and edits must write through to the same store object the rest of the app renders. `buildDetailed\n * Transactions` inside the store is this repo's equivalent of pulse's `buildTransactionDetails`.\n * A guid the store does not have resolves to `undefined` (the block's error state) rather than to\n * any beat-level snapshot, so inline edits can never be made against a stale copy.\n *\n * An edit made here (category, date, memo...) replaces the transaction in the store. The beat's card\n * is built from live data (a sampled beat's count), so the host is told the beat is stale, the same\n * signal a CTA's `refreshBeat` effect sends; pulse refetches the sample on it, as its legacy cards do\n * through `shouldUpdateOnTransactionChange`.\n *\n * Actions are not beat-configurable on the v2 contract: `instance_slot_data` is not part of it (the\n * LargeTransactionV2 payload omits the key entirely), so top actions are always the defaults and\n * bottom actions are derived from the triggering CTA's variant.\n */\nexport const useTransactionDetailsBlock = (beat: Beat): TransactionDetailsBlockState => {\n const { detailedTransactions, isTransactionDataLoaded, transactions } = useTransactionStore()\n const { emitUpdate } = useGlobalStore()\n\n const { actionDrawer } = useInsightsV2Store()\n\n const { transaction_guid } = useActionContext<DrilldownPayload>() ?? {}\n const payload = beat.insights_payload\n\n const guid = transaction_guid ?? payload?.primary_transaction_guid\n\n const transaction = guid\n ? detailedTransactions.find((transaction) => transaction.guid === guid)\n : undefined\n\n // Every store load swaps in new objects, so an edit is a change in the transaction's content, not\n // its identity. The snapshot is per guid: opening another transaction is not an edit of the last.\n const stored = guid ? transactions.find((transaction) => transaction.guid === guid) : undefined\n const snapshot = stored ? JSON.stringify(stored) : undefined\n const seen = React.useRef({ guid, snapshot })\n\n React.useEffect(() => {\n if (!snapshot) return\n\n const isEdit = seen.current.guid === guid && seen.current.snapshot !== undefined\n const changed = seen.current.snapshot !== snapshot\n seen.current = { guid, snapshot }\n if (isEdit && changed) emitUpdate({ staleBeatGuid: beat.guid })\n }, [guid, snapshot, beat.guid, emitUpdate])\n\n const bottomActions = getBottomActionsByVariant(\n actionDrawer,\n payload?.primary_cta,\n payload?.secondary_cta,\n payload?.in_description_cta,\n )\n return {\n bottomActions,\n isLoading: !isTransactionDataLoaded,\n topActions: resolveTopActions(),\n transaction,\n }\n}\n"],"mappings":";;;;AA+CA,IAAa,IAAA,CAA8B,MAA6C;AACtF,QAAM,EAAE,sBAAA,GAAsB,yBAAA,GAAyB,cAAA,EAAA,IAAiB,EAAoB,GACtF,EAAE,YAAA,EAAA,IAAe,EAAe,GAEhC,EAAE,cAAA,EAAA,IAAiB,EAAmB,GAEtC,EAAE,kBAAA,EAAA,IAAqB,EAAmC,KAAK,CAAC,GAChE,IAAU,EAAK,kBAEf,IAAO,KAAoB,GAAS,0BAEpC,IAAc,IAChB,EAAqB,KAAA,CAAM,MAAgB,EAAY,SAAS,CAAI,IACpE,QAIE,IAAS,IAAO,EAAa,KAAA,CAAM,MAAgB,EAAY,SAAS,CAAI,IAAI,QAChF,IAAW,IAAS,KAAK,UAAU,CAAM,IAAI,QAC7C,IAAO,EAAM,OAAO;AAAA,IAAE,MAAA;AAAA,IAAM,UAAA;AAAA,EAAS,CAAC;AAE5C,SAAA,EAAM,UAAA,MAAgB;AACpB,QAAI,CAAC,EAAU;AAEf,UAAM,IAAS,EAAK,QAAQ,SAAS,KAAQ,EAAK,QAAQ,aAAa,QACjE,IAAU,EAAK,QAAQ,aAAa;AAC1C,IAAA,EAAK,UAAU;AAAA,MAAE,MAAA;AAAA,MAAM,UAAA;AAAA,IAAS,GAC5B,KAAU,KAAS,EAAW,EAAE,eAAe,EAAK,KAAK,CAAC;AAAA,EAChE,GAAG;AAAA,IAAC;AAAA,IAAM;AAAA,IAAU,EAAK;AAAA,IAAM;AAAA,EAAU,CAAC,GAQnC;AAAA,IACL,eAPoB,EACpB,GACA,GAAS,aACT,GAAS,eACT,GAAS,kBAGT;AAAA,IACA,WAAW,CAAC;AAAA,IACZ,YAAY,EAAkB;AAAA,IAC9B,aAAA;AAAA,EACF;AACF"}
@@ -1,30 +1,36 @@
1
- import { useGlobalCopyStore as f, useInsightsV2Store as g, useTransactionStore as _ } from "../../../common/context/hooks.es.js";
2
- import C from "../../../common/components/drawer/Drawer.es.js";
1
+ import { useGlobalCopyStore as _, useInsightsV2Store as p, useTransactionStore as f } from "../../../common/context/hooks.es.js";
2
+ import y from "../../../common/components/drawer/Drawer.es.js";
3
3
  import h from "../../../transactions/components/shared/TransactionList.es.js";
4
- import { selectTransactionsByGuids as y } from "../../CommonUtils.es.js";
4
+ import { selectTransactionsByGuids as C } from "../../CommonUtils.es.js";
5
5
  import { TransactionDetailsBlock as T } from "../TransactionDetailsBlock/TransactionDetailsBlock.es.js";
6
- import D from "react";
7
- import { observer as k } from "mobx-react-lite";
8
- import { Fragment as S, jsx as t, jsxs as v } from "react/jsx-runtime";
9
- var G = k(function({ beat: o }) {
10
- const { common: i, insights_feed: r } = f(), { setActionContext: s } = g(), e = _(), [c, n] = D.useState(!1), a = o.insights_payload?.instance_slot_data ?? {}, l = Array.isArray(a.transaction_guids) ? a.transaction_guids : void 0, m = y(e.detailedTransactions, l), d = (u) => {
11
- s({ transaction_guid: u }), n(!0);
12
- }, p = () => {
13
- n(!1), s({ transaction_guid: void 0 });
6
+ import v from "react";
7
+ import { observer as w } from "mobx-react-lite";
8
+ import { Fragment as k, jsx as i, jsxs as D } from "react/jsx-runtime";
9
+ var S = (s) => Array.isArray(s) && s.every((t) => typeof t == "string"), B = (s) => {
10
+ const t = s.insights_payload?.drilldown_data, o = s.insights_payload?.instance_slot_data ?? {}, [a, n] = t && Object.hasOwn(t, "transaction_guids") ? ["drilldown_data", t.transaction_guids] : ["instance_slot_data", o.transaction_guids];
11
+ if (n != null) {
12
+ if (S(n)) return n;
13
+ console.warn(`[TransactionListBlock] ${a}.transaction_guids is not a list of guids — listing no transactions.`);
14
+ }
15
+ }, I = w(function({ beat: t }) {
16
+ const { common: o, insights_feed: a } = _(), { setActionContext: n } = p(), e = f(), [c, r] = v.useState(!1), l = B(t), d = C(e.detailedTransactions, l), m = (g) => {
17
+ n({ transaction_guid: g }), r(!0);
18
+ }, u = () => {
19
+ r(!1), n({ transaction_guid: void 0 });
14
20
  };
15
- return /* @__PURE__ */ v(S, { children: [/* @__PURE__ */ t(h, {
16
- onClick: d,
17
- transaction: m
18
- }), /* @__PURE__ */ t(C, {
19
- ariaLabelClose: i.close_aria,
21
+ return /* @__PURE__ */ D(k, { children: [/* @__PURE__ */ i(h, {
22
+ onClick: m,
23
+ transaction: d
24
+ }), /* @__PURE__ */ i(y, {
25
+ ariaLabelClose: o.close_aria,
20
26
  isOpen: c,
21
- onClose: p,
22
- title: r.general.transaction_details_title,
23
- children: /* @__PURE__ */ t(T, { beat: o })
27
+ onClose: u,
28
+ title: a.general.transaction_details_title,
29
+ children: /* @__PURE__ */ i(T, { beat: t })
24
30
  })] });
25
31
  });
26
32
  export {
27
- G as TransactionListBlock
33
+ I as TransactionListBlock
28
34
  };
29
35
 
30
36
  //# sourceMappingURL=TransactionListBlock.es.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"TransactionListBlock.es.js","names":[],"sources":["../../../../src/insights-v2/actionBlocks/TransactionListBlock/TransactionListBlock.tsx"],"sourcesContent":["import React from 'react'\n\nimport { observer } from 'mobx-react-lite'\n\nimport {\n Drawer,\n useGlobalCopyStore,\n useInsightsV2Store,\n useTransactionStore,\n} from '../../../common'\nimport type { Beat } from '../../../core'\nimport type { InsightsInstanceSlotData } from '../../../core/types/InsightsInstanceSlotData'\nimport { TransactionDetailsBlock } from '../TransactionDetailsBlock'\nimport { TransactionList } from '../../../transactions'\nimport { selectTransactionsByGuids } from '../../CommonUtils'\n\nexport interface TransactionListBlockProps {\n beat: Beat\n}\n\n/**\n * Opens a date-grouped list of the transactions a beat points at. Tapping a row stacks\n * the Transaction Details drawer over the list.\n *\n * ActionBlockLayer owns the outer Drawer (title, close button, copy-loaded gate).\n */\nexport const TransactionListBlock = observer(function TransactionListBlock({\n beat,\n}: TransactionListBlockProps) {\n const { common: commonCopy, insights_feed: insightsCopy } = useGlobalCopyStore()\n const { setActionContext } = useInsightsV2Store()\n const transactionStore = useTransactionStore()\n\n const [isDetailsOpen, setIsDetailsOpen] = React.useState(false)\n\n const slotData = (beat.insights_payload?.instance_slot_data ?? {}) as InsightsInstanceSlotData\n // Guard the untrusted payload cast: a non-array transaction_guids would be fed to new Set()\n // inside selectTransactionsByGuids and match per-character.\n const guids = Array.isArray(slotData.transaction_guids) ? slotData.transaction_guids : undefined\n const transactions = selectTransactionsByGuids(transactionStore.detailedTransactions, guids)\n\n const handleRowClick = (guid: string) => {\n setActionContext({ transaction_guid: guid })\n setIsDetailsOpen(true)\n }\n\n const handleDetailsClose = () => {\n setIsDetailsOpen(false)\n // Clear only the key this nested drawer owns — same convention as TransactionHistoryBlock.\n // `setActionContext` merges, so an explicit `{}` would be a no-op; naming the key keeps the\n // outer drawer's own context intact.\n setActionContext({ transaction_guid: undefined })\n }\n\n return (\n <>\n <TransactionList onClick={handleRowClick} transaction={transactions} />\n <Drawer\n ariaLabelClose={commonCopy.close_aria}\n isOpen={isDetailsOpen}\n onClose={handleDetailsClose}\n title={insightsCopy.general.transaction_details_title}\n >\n <TransactionDetailsBlock beat={beat} />\n </Drawer>\n </>\n )\n})\n"],"mappings":";;;;;;;;AA0BA,IAAa,IAAuB,EAAS,SAA8B,EACzE,MAAA,EAAA,GAC4B;AAC5B,QAAM,EAAE,QAAQ,GAAY,eAAe,EAAA,IAAiB,EAAmB,GACzE,EAAE,kBAAA,EAAA,IAAqB,EAAmB,GAC1C,IAAmB,EAAoB,GAEvC,CAAC,GAAe,CAAA,IAAoB,EAAM,SAAS,EAAK,GAExD,IAAY,EAAK,kBAAkB,sBAAsB,CAAC,GAG1D,IAAQ,MAAM,QAAQ,EAAS,iBAAiB,IAAI,EAAS,oBAAoB,QACjF,IAAe,EAA0B,EAAiB,sBAAsB,CAAK,GAErF,IAAA,CAAkB,MAAiB;AACvC,IAAA,EAAiB,EAAE,kBAAkB,EAAK,CAAC,GAC3C,EAAiB,EAAI;AAAA,EACvB,GAEM,IAAA,MAA2B;AAC/B,IAAA,EAAiB,EAAK,GAItB,EAAiB,EAAE,kBAAkB,OAAU,CAAC;AAAA,EAClD;AAEA,SACE,gBAAA,EAAA,GAAA,EAAA,UAAA,CACE,gBAAA,EAAC,GAAD;AAAA,IAAiB,SAAS;AAAA,IAAgB,aAAa;AAAA,EAAe,CAAA,GACtE,gBAAA,EAAC,GAAD;AAAA,IACE,gBAAgB,EAAW;AAAA,IAC3B,QAAQ;AAAA,IACR,SAAS;AAAA,IACT,OAAO,EAAa,QAAQ;AAAA,IAE5B,UAAA,gBAAA,EAAC,GAAD,EAA+B,MAAA,EAAO,CAAA;AAAA,EAChC,CAAA,CACR,EAAA,CAAA;AAEN,CAAC"}
1
+ {"version":3,"file":"TransactionListBlock.es.js","names":[],"sources":["../../../../src/insights-v2/actionBlocks/TransactionListBlock/TransactionListBlock.tsx"],"sourcesContent":["import React from 'react'\n\nimport { observer } from 'mobx-react-lite'\n\nimport {\n Drawer,\n useGlobalCopyStore,\n useInsightsV2Store,\n useTransactionStore,\n} from '../../../common'\nimport type { Beat } from '../../../core'\nimport type { InsightsInstanceSlotData } from '../../../core/types/InsightsInstanceSlotData'\nimport { TransactionDetailsBlock } from '../TransactionDetailsBlock'\nimport { TransactionList } from '../../../transactions'\nimport { selectTransactionsByGuids } from '../../CommonUtils'\n\nconst isStringArray = (value: unknown): value is string[] =>\n Array.isArray(value) && value.every((item) => typeof item === 'string')\n\n/**\n * The guids the drawer lists. V2 envelopes send them on `drilldown_data`, V1 on\n * `instance_slot_data`, which is read only when the V2 key is absent. The payload is untrusted, so\n * a present but malformed list fails closed (no rows, and a warning) rather than showing the other\n * source's rows; a non-array would otherwise reach new Set() inside selectTransactionsByGuids and\n * match per-character.\n */\nconst resolveTransactionGuids = (beat: Beat): string[] | undefined => {\n const drilldown = beat.insights_payload?.drilldown_data\n const slotData = (beat.insights_payload?.instance_slot_data ?? {}) as InsightsInstanceSlotData\n const [source, value]: [string, unknown] =\n drilldown && Object.hasOwn(drilldown, 'transaction_guids')\n ? ['drilldown_data', drilldown.transaction_guids]\n : ['instance_slot_data', slotData.transaction_guids]\n\n if (value == null) return undefined\n if (isStringArray(value)) return value\n\n console.warn(\n `[TransactionListBlock] ${source}.transaction_guids is not a list of guids — listing no transactions.`,\n )\n return undefined\n}\n\nexport interface TransactionListBlockProps {\n beat: Beat\n}\n\n/**\n * Opens a date-grouped list of the transactions a beat points at. Tapping a row stacks\n * the Transaction Details drawer over the list.\n *\n * ActionBlockLayer owns the outer Drawer (title, close button, copy-loaded gate).\n */\nexport const TransactionListBlock = observer(function TransactionListBlock({\n beat,\n}: TransactionListBlockProps) {\n const { common: commonCopy, insights_feed: insightsCopy } = useGlobalCopyStore()\n const { setActionContext } = useInsightsV2Store()\n const transactionStore = useTransactionStore()\n\n const [isDetailsOpen, setIsDetailsOpen] = React.useState(false)\n\n const guids = resolveTransactionGuids(beat)\n const transactions = selectTransactionsByGuids(transactionStore.detailedTransactions, guids)\n\n const handleRowClick = (guid: string) => {\n setActionContext({ transaction_guid: guid })\n setIsDetailsOpen(true)\n }\n\n const handleDetailsClose = () => {\n setIsDetailsOpen(false)\n // Clear only the key this nested drawer owns — same convention as TransactionHistoryBlock.\n // `setActionContext` merges, so an explicit `{}` would be a no-op; naming the key keeps the\n // outer drawer's own context intact.\n setActionContext({ transaction_guid: undefined })\n }\n\n return (\n <>\n <TransactionList onClick={handleRowClick} transaction={transactions} />\n <Drawer\n ariaLabelClose={commonCopy.close_aria}\n isOpen={isDetailsOpen}\n onClose={handleDetailsClose}\n title={insightsCopy.general.transaction_details_title}\n >\n <TransactionDetailsBlock beat={beat} />\n </Drawer>\n </>\n )\n})\n"],"mappings":";;;;;;;;AAgBA,IAAM,IAAA,CAAiB,MACrB,MAAM,QAAQ,CAAK,KAAK,EAAM,MAAA,CAAO,MAAS,OAAO,KAAS,QAAQ,GASlE,IAAA,CAA2B,MAAqC;AACpE,QAAM,IAAY,EAAK,kBAAkB,gBACnC,IAAY,EAAK,kBAAkB,sBAAsB,CAAC,GAC1D,CAAC,GAAQ,CAAA,IACb,KAAa,OAAO,OAAO,GAAW,mBAAmB,IACrD,CAAC,kBAAkB,EAAU,iBAAiB,IAC9C,CAAC,sBAAsB,EAAS,iBAAiB;AAEvD,MAAI,KAAS,MACb;AAAA,QAAI,EAAc,CAAK,EAAG,QAAO;AAEjC,YAAQ,KACN,0BAA0B,CAAA,sEAC5B;AAAA;AAEF,GAYa,IAAuB,EAAS,SAA8B,EACzE,MAAA,EAAA,GAC4B;AAC5B,QAAM,EAAE,QAAQ,GAAY,eAAe,EAAA,IAAiB,EAAmB,GACzE,EAAE,kBAAA,EAAA,IAAqB,EAAmB,GAC1C,IAAmB,EAAoB,GAEvC,CAAC,GAAe,CAAA,IAAoB,EAAM,SAAS,EAAK,GAExD,IAAQ,EAAwB,CAAI,GACpC,IAAe,EAA0B,EAAiB,sBAAsB,CAAK,GAErF,IAAA,CAAkB,MAAiB;AACvC,IAAA,EAAiB,EAAE,kBAAkB,EAAK,CAAC,GAC3C,EAAiB,EAAI;AAAA,EACvB,GAEM,IAAA,MAA2B;AAC/B,IAAA,EAAiB,EAAK,GAItB,EAAiB,EAAE,kBAAkB,OAAU,CAAC;AAAA,EAClD;AAEA,SACE,gBAAA,EAAA,GAAA,EAAA,UAAA,CACE,gBAAA,EAAC,GAAD;AAAA,IAAiB,SAAS;AAAA,IAAgB,aAAa;AAAA,EAAe,CAAA,GACtE,gBAAA,EAAC,GAAD;AAAA,IACE,gBAAgB,EAAW;AAAA,IAC3B,QAAQ;AAAA,IACR,SAAS;AAAA,IACT,OAAO,EAAa,QAAQ;AAAA,IAE5B,UAAA,gBAAA,EAAC,GAAD,EAA+B,MAAA,EAAO,CAAA;AAAA,EAChC,CAAA,CACR,EAAA,CAAA;AAEN,CAAC"}
@@ -1,4 +1,14 @@
1
- import { DoubleProgressBarBlockData } from '../../../../core/types/InsightsInstanceSlotData';
2
- import { BlockProps } from '../../types';
3
- declare const DoubleProgressBarBlock: ({ payload }: BlockProps<DoubleProgressBarBlockData>) => import("react/jsx-runtime").JSX.Element;
1
+ import { InsightsPayload } from '../../../../core';
2
+ interface DoubleProgressBarBlockProps {
3
+ payload: InsightsPayload;
4
+ }
5
+ /**
6
+ * The `double_progress_bar_block`: two stacked bars comparing a previous and a latest amount
7
+ * (Subscription Price Increase's old vs new subscription price). Rows arrive pre-localized on
8
+ * `instance_slot.data.series` as `[previous, latest]` (`primary_text` label, `amount`); only the
9
+ * amount is formatted here, because the contract sends it as a number. The previous bar is sized
10
+ * as previous / latest (clamped to 0–100, since it becomes `aria-valuenow`) and the latest at 100%.
11
+ * Renders nothing unless both rows are present with finite numeric amounts.
12
+ */
13
+ declare const DoubleProgressBarBlock: ({ payload }: DoubleProgressBarBlockProps) => import("react/jsx-runtime").JSX.Element | null;
4
14
  export default DoubleProgressBarBlock;
@@ -1,28 +1,33 @@
1
- import r from "./ProgressBar.es.js";
2
- import u from "@mui/material/Stack";
3
- import { jsx as o, jsxs as n } from "react/jsx-runtime";
4
- var i = ({ payload: t }) => {
5
- const { instance_slot_data: l } = t, { previous: e, latest: a } = l.doubleProgressBar, s = Math.round(e.value / a.value * 100);
6
- return /* @__PURE__ */ n(u, {
1
+ import { slot as p } from "../../../../core/types/Insights.es.js";
2
+ import s from "./ProgressBar.es.js";
3
+ import c from "@mui/material/Stack";
4
+ import { jsx as m, jsxs as f } from "react/jsx-runtime";
5
+ var u = (t) => !!t && typeof t.amount == "number" && Number.isFinite(t.amount), d = ({ payload: t }) => {
6
+ const r = p(t.instance_slot.data, "series");
7
+ if (!Array.isArray(r) || r.length < 2) return null;
8
+ const [e, o] = r;
9
+ if (!u(e) || !u(o)) return null;
10
+ const n = e.amount, a = o.amount, i = a ? Math.round(n / a * 100) : 0, l = Math.min(100, Math.max(0, i));
11
+ return /* @__PURE__ */ f(c, {
7
12
  sx: {
8
13
  px: 16,
9
14
  pt: 8,
10
15
  gap: 16
11
16
  },
12
- children: [/* @__PURE__ */ o(r, {
13
- amount: e.value,
14
- label: e.label,
15
- percentage: s
16
- }), /* @__PURE__ */ o(r, {
17
- amount: a.value,
17
+ children: [/* @__PURE__ */ m(s, {
18
+ amount: n,
19
+ label: e.primary_text ?? "",
20
+ percentage: l
21
+ }), /* @__PURE__ */ m(s, {
22
+ amount: a,
18
23
  isBold: !0,
19
- label: a.label,
24
+ label: o.primary_text ?? "",
20
25
  percentage: 100
21
26
  })]
22
27
  });
23
28
  };
24
29
  export {
25
- i as default
30
+ d as default
26
31
  };
27
32
 
28
33
  //# sourceMappingURL=DoubleProgressBarBlock.es.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"DoubleProgressBarBlock.es.js","names":[],"sources":["../../../../../src/insights-v2/blocks/ChartBlocks/DoubleProgressBarBlock/DoubleProgressBarBlock.tsx"],"sourcesContent":["import Stack from '@mui/material/Stack'\nimport { DoubleProgressBarBlockData } from '../../../../core/types/InsightsInstanceSlotData'\n\nimport type { BlockProps } from '../../types'\n\nimport ProgressBar from './ProgressBar'\n\nconst DoubleProgressBarBlock = ({ payload }: BlockProps<DoubleProgressBarBlockData>) => {\n const { instance_slot_data } = payload\n const { previous, latest } = instance_slot_data.doubleProgressBar\n const percentage = Math.round((previous.value / latest.value) * 100)\n\n return (\n <Stack sx={{ px: 16, pt: 8, gap: 16 }}>\n <ProgressBar amount={previous.value} label={previous.label} percentage={percentage} />\n <ProgressBar amount={latest.value} isBold={true} label={latest.label} percentage={100} />\n </Stack>\n )\n}\n\nexport default DoubleProgressBarBlock\n"],"mappings":";;;AAOA,IAAM,IAAA,CAA0B,EAAE,SAAA,EAAA,MAAsD;AACtF,QAAM,EAAE,oBAAA,EAAA,IAAuB,GACzB,EAAE,UAAA,GAAU,QAAA,EAAA,IAAW,EAAmB,mBAC1C,IAAa,KAAK,MAAO,EAAS,QAAQ,EAAO,QAAS,GAAG;AAEnE,SACE,gBAAA,EAAC,GAAD;AAAA,IAAO,IAAI;AAAA,MAAE,IAAI;AAAA,MAAI,IAAI;AAAA,MAAG,KAAK;AAAA,IAAG;AAAA,IAApC,UAAA,CACE,gBAAA,EAAC,GAAD;AAAA,MAAa,QAAQ,EAAS;AAAA,MAAO,OAAO,EAAS;AAAA,MAAmB,YAAA;AAAA,IAAa,CAAA,GACrF,gBAAA,EAAC,GAAD;AAAA,MAAa,QAAQ,EAAO;AAAA,MAAO,QAAQ;AAAA,MAAM,OAAO,EAAO;AAAA,MAAO,YAAY;AAAA,IAAM,CAAA,CACnF;AAAA;AAEX"}
1
+ {"version":3,"file":"DoubleProgressBarBlock.es.js","names":[],"sources":["../../../../../src/insights-v2/blocks/ChartBlocks/DoubleProgressBarBlock/DoubleProgressBarBlock.tsx"],"sourcesContent":["import Stack from '@mui/material/Stack'\n\nimport { slot } from '../../../../core'\nimport type { InsightsPayload, InstanceSlotRow } from '../../../../core'\n\nimport ProgressBar from './ProgressBar'\n\ninterface DoubleProgressBarBlockProps {\n payload: InsightsPayload\n}\n\nconst hasNumericAmount = (\n row: InstanceSlotRow | undefined,\n): row is InstanceSlotRow & { amount: number } =>\n !!row && typeof row.amount === 'number' && Number.isFinite(row.amount)\n\n/**\n * The `double_progress_bar_block`: two stacked bars comparing a previous and a latest amount\n * (Subscription Price Increase's old vs new subscription price). Rows arrive pre-localized on\n * `instance_slot.data.series` as `[previous, latest]` (`primary_text` label, `amount`); only the\n * amount is formatted here, because the contract sends it as a number. The previous bar is sized\n * as previous / latest (clamped to 0–100, since it becomes `aria-valuenow`) and the latest at 100%.\n * Renders nothing unless both rows are present with finite numeric amounts.\n */\nconst DoubleProgressBarBlock = ({ payload }: DoubleProgressBarBlockProps) => {\n const series = slot<InstanceSlotRow[]>(payload.instance_slot.data, 'series')\n\n if (!Array.isArray(series) || series.length < 2) return null\n\n const [previous, latest] = series\n if (!hasNumericAmount(previous) || !hasNumericAmount(latest)) return null\n\n const previousAmount = previous.amount\n const latestAmount = latest.amount\n const ratio = latestAmount ? Math.round((previousAmount / latestAmount) * 100) : 0\n const percentage = Math.min(100, Math.max(0, ratio))\n\n return (\n <Stack sx={{ px: 16, pt: 8, gap: 16 }}>\n <ProgressBar\n amount={previousAmount}\n label={previous.primary_text ?? ''}\n percentage={percentage}\n />\n <ProgressBar\n amount={latestAmount}\n isBold={true}\n label={latest.primary_text ?? ''}\n percentage={100}\n />\n </Stack>\n )\n}\n\nexport default DoubleProgressBarBlock\n"],"mappings":";;;;AAWA,IAAM,IAAA,CACJ,MAEA,CAAC,CAAC,KAAO,OAAO,EAAI,UAAW,YAAY,OAAO,SAAS,EAAI,MAAM,GAUjE,IAAA,CAA0B,EAAE,SAAA,EAAA,MAA2C;AAC3E,QAAM,IAAS,EAAwB,EAAQ,cAAc,MAAM,QAAQ;AAE3E,MAAI,CAAC,MAAM,QAAQ,CAAM,KAAK,EAAO,SAAS,EAAG,QAAO;AAExD,QAAM,CAAC,GAAU,CAAA,IAAU;AAC3B,MAAI,CAAC,EAAiB,CAAQ,KAAK,CAAC,EAAiB,CAAM,EAAG,QAAO;AAErE,QAAM,IAAiB,EAAS,QAC1B,IAAe,EAAO,QACtB,IAAQ,IAAe,KAAK,MAAO,IAAiB,IAAgB,GAAG,IAAI,GAC3E,IAAa,KAAK,IAAI,KAAK,KAAK,IAAI,GAAG,CAAK,CAAC;AAEnD,SACE,gBAAA,EAAC,GAAD;AAAA,IAAO,IAAI;AAAA,MAAE,IAAI;AAAA,MAAI,IAAI;AAAA,MAAG,KAAK;AAAA,IAAG;AAAA,IAApC,UAAA,CACE,gBAAA,EAAC,GAAD;AAAA,MACE,QAAQ;AAAA,MACR,OAAO,EAAS,gBAAgB;AAAA,MACpB,YAAA;AAAA,IACb,CAAA,GACD,gBAAA,EAAC,GAAD;AAAA,MACE,QAAQ;AAAA,MACR,QAAQ;AAAA,MACR,OAAO,EAAO,gBAAgB;AAAA,MAC9B,YAAY;AAAA,IACb,CAAA,CACI;AAAA;AAEX"}
@@ -12,6 +12,9 @@ interface TransactionBlockProps {
12
12
  * This is the full/mini shape. The reduced widgets (micro, embedded) resolve to the row logo
13
13
  * alone, carried flat on `data.logo` with no `series`, and are drawn by `CompactInsightCard`.
14
14
  *
15
+ * `status_message` draws no rows: `data.message` beside the `data.icon` logo, as a
16
+ * `StatusMessageCard` banner (Uncategorized Transactions V2 `complete`).
17
+ *
15
18
  * A header, when the variant shows one, comes from `instance_slot.data.header_text` (the
16
19
  * transaction date, or "{count} transactions"). It deliberately does *not* come from the first
17
20
  * row: on a `with_merchant` card a row's `secondary_text` is the category, so reading it here
@@ -1,74 +1,89 @@
1
- import { useCategoryStore as p } from "../../../../common/context/hooks.es.js";
2
- import { slot as c } from "../../../../core/types/Insights.es.js";
3
- import { formatCurrency as _ } from "../../../../core/utils/NumberFormatting.es.js";
4
- import { logoFromRef as y } from "../../../components/shared/EntityLogo.es.js";
5
- import { resolveVariantConfig as h } from "../../resolveVariantConfig.es.js";
6
- import x from "../../../components/TransactionListCard.es.js";
7
- import { getLayoutConfig as v, transactionBlockVariant as C } from "./layout.es.js";
8
- import { observer as I } from "mobx-react-lite";
9
- import { CategoryIcon as G, InstitutionLogo as L, MerchantLogo as O } from "@mxenabled/mxui";
10
- import { Icon as T } from "@mxenabled/mx-icons";
1
+ import { useCategoryStore as _ } from "../../../../common/context/hooks.es.js";
2
+ import { slot as s } from "../../../../core/types/Insights.es.js";
3
+ import { formatCurrency as y } from "../../../../core/utils/NumberFormatting.es.js";
4
+ import { logoFromRef as h } from "../../../components/shared/EntityLogo.es.js";
5
+ import x from "../../../components/LogoFromGuid.es.js";
6
+ import { resolveVariantConfig as v } from "../../resolveVariantConfig.es.js";
7
+ import C from "../../../components/TransactionListCard.es.js";
8
+ import I from "../../../components/StatusMessageCard.es.js";
9
+ import { getLayoutConfig as G, transactionBlockVariant as L } from "./layout.es.js";
10
+ import { observer as T } from "mobx-react-lite";
11
+ import { CategoryIcon as S, InstitutionLogo as O, MerchantLogo as k } from "@mxenabled/mxui";
12
+ import { Icon as z } from "@mxenabled/mx-icons";
11
13
  import { jsx as o } from "react/jsx-runtime";
12
- import { useTheme as b } from "@mui/material/styles";
13
- import u from "@mui/material/Box";
14
- var r = 32, k = Math.round(r * 0.625), z = (n, a) => {
15
- const t = y(n.logo, n.primary_text);
14
+ import { useTheme as B } from "@mui/material/styles";
15
+ import c from "@mui/material/Box";
16
+ var i = 32, b = Math.round(i * 0.625), M = 20, R = (n, a) => {
17
+ const t = h(n.logo, n.primary_text);
16
18
  if (t) {
17
- if (t.logo_name) return /* @__PURE__ */ o(u, {
19
+ if (t.logo_name) return /* @__PURE__ */ o(c, {
18
20
  sx: {
19
21
  alignItems: "center",
20
22
  display: "flex",
21
- height: r,
23
+ height: i,
22
24
  justifyContent: "center",
23
- width: r
25
+ width: i
24
26
  },
25
- children: /* @__PURE__ */ o(T, {
27
+ children: /* @__PURE__ */ o(z, {
26
28
  name: t.logo_name,
27
- size: k,
29
+ size: b,
28
30
  sx: { color: t.logo_color }
29
31
  })
30
32
  });
31
- if (t.merchant_guid) return /* @__PURE__ */ o(O, {
33
+ if (t.merchant_guid) return /* @__PURE__ */ o(k, {
32
34
  alt: t.merchant_name ?? "",
33
35
  categoryGuid: t.category_guid ? a(t.category_guid) : "",
34
36
  merchantGuid: t.merchant_guid,
35
- size: r
37
+ size: i
36
38
  });
37
- if (t.institution_guid) return /* @__PURE__ */ o(L, {
39
+ if (t.institution_guid) return /* @__PURE__ */ o(O, {
38
40
  alt: t.institution_name ?? "",
39
41
  institutionGuid: t.institution_guid,
40
- size: r
42
+ size: i
41
43
  });
42
44
  if (t.category_guid) {
43
45
  const e = a(t.category_guid);
44
- return /* @__PURE__ */ o(u, {
46
+ return /* @__PURE__ */ o(c, {
45
47
  "data-testid": `category-icon-${e}`,
46
48
  sx: { display: "flex" },
47
- children: /* @__PURE__ */ o(G, {
49
+ children: /* @__PURE__ */ o(S, {
48
50
  categoryGuid: e,
49
- size: r
51
+ size: i
50
52
  })
51
53
  });
52
54
  }
53
55
  }
54
- }, F = I(({ payload: n }) => {
55
- const a = b(), { getTopLevelCategoryGuid: t } = p(), { data: e, variant: d } = n.instance_slot, s = c(e, "series"), m = c(e, "header_text");
56
- if (!Array.isArray(s) || !s.length) return null;
57
- const { background: g, cardVariant: l, showHeader: f } = h(v(a), d, C.NoHeader, "TransactionBlock");
58
- return /* @__PURE__ */ o(x, {
59
- background: g,
60
- header: f && typeof m == "string" ? m : void 0,
56
+ }, K = T(({ payload: n }) => {
57
+ const a = B(), { getTopLevelCategoryGuid: t } = _(), { data: e, variant: u } = n.instance_slot, { background: d, cardVariant: l, showHeader: f, statusMessage: p } = v(G(a), u, L.NoHeader, "TransactionBlock");
58
+ if (p) {
59
+ const r = s(e, "message");
60
+ return typeof r != "string" || !r.trim() ? (console.warn("[TransactionBlock] status_message has no message — rendering nothing."), null) : /* @__PURE__ */ o(I, {
61
+ icon: /* @__PURE__ */ o(c, {
62
+ "aria-hidden": "true",
63
+ sx: { display: "flex" },
64
+ children: /* @__PURE__ */ o(x, {
65
+ logo: s(e, "icon"),
66
+ size: M
67
+ })
68
+ }),
69
+ message: r
70
+ });
71
+ }
72
+ const m = s(e, "series"), g = s(e, "header_text");
73
+ return !Array.isArray(m) || !m.length ? null : /* @__PURE__ */ o(C, {
74
+ background: d,
75
+ header: f && typeof g == "string" ? g : void 0,
61
76
  variant: l,
62
- rows: s.map((i) => ({
63
- amount: typeof i.amount == "number" ? _(i.amount, "0,0.00") : "",
64
- leading: z(i, t),
65
- subtitle: i.secondary_text ?? "",
66
- title: i.primary_text ?? ""
77
+ rows: m.map((r) => ({
78
+ amount: typeof r.amount == "number" ? y(r.amount, "0,0.00") : "",
79
+ leading: R(r, t),
80
+ subtitle: r.secondary_text ?? "",
81
+ title: r.primary_text ?? ""
67
82
  }))
68
83
  });
69
84
  });
70
85
  export {
71
- F as TransactionBlock
86
+ K as TransactionBlock
72
87
  };
73
88
 
74
89
  //# sourceMappingURL=TransactionBlock.es.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"TransactionBlock.es.js","names":[],"sources":["../../../../../src/insights-v2/blocks/ComponentBlocks/TransactionBlock/TransactionBlock.tsx"],"sourcesContent":["import { observer } from 'mobx-react-lite'\n\nimport Box from '@mui/material/Box'\nimport { useTheme } from '@mui/material/styles'\n\nimport { CategoryIcon, InstitutionLogo, MerchantLogo } from '@mxenabled/mxui'\nimport { Icon } from '@mxenabled/mx-icons'\n\nimport { useCategoryStore } from '../../../../common'\nimport { slot } from '../../../../core'\nimport type { InsightsPayload, InstanceSlotRow } from '../../../../core'\nimport { formatCurrency } from '../../../../core/utils/NumberFormatting'\n\nimport TransactionListCard from '../../../components/TransactionListCard'\nimport { logoFromRef } from '../../../components/shared/EntityLogo'\n\nimport { resolveVariantConfig } from '../../resolveVariantConfig'\nimport { getLayoutConfig, transactionBlockVariant } from './layout'\n\ninterface TransactionBlockProps {\n payload: InsightsPayload\n beatGuid?: string\n}\n\nconst ROW_LOGO_SIZE = 32\n// Same glyph-to-tile ratio mxui's `CategoryIcon` uses, so a status icon sits like the other logos.\nconst ROW_ICON_SIZE = Math.round(ROW_LOGO_SIZE * 0.625)\n\n/**\n * Renders the row's leading logo from its `LogoRef`: a status icon, or an entity guid whose prefix\n * names the entity. An unrecognized prefix renders no logo rather than guessing.\n *\n * `resolveTopLevelCategory`: mxui's `CategoryIcon` only knows the top-level category guids and\n * silently falls back to the Uncategorized icon for a sub-category. The details drawer avoids\n * this by passing `transaction.top_level_category_guid`; the row only has the raw guid, so it is\n * walked up to its parent here (identity until categories load). That applies both to a `CAT-`\n * row logo and to a merchant's `fallback_guid`, which `MerchantLogo` draws through the same\n * `CategoryIcon` when the merchant image fails to load.\n */\nconst renderRowLogo = (row: InstanceSlotRow, resolveTopLevelCategory: (guid: string) => string) => {\n const logo = logoFromRef(row.logo, row.primary_text)\n\n if (!logo) return undefined\n\n if (logo.logo_name) {\n // A fixed box the size of the other logos keeps the row's text column aligned.\n return (\n <Box\n sx={{\n alignItems: 'center',\n display: 'flex',\n height: ROW_LOGO_SIZE,\n justifyContent: 'center',\n width: ROW_LOGO_SIZE,\n }}\n >\n <Icon name={logo.logo_name} size={ROW_ICON_SIZE} sx={{ color: logo.logo_color }} />\n </Box>\n )\n }\n\n if (logo.merchant_guid) {\n return (\n <MerchantLogo\n alt={logo.merchant_name ?? ''}\n categoryGuid={logo.category_guid ? resolveTopLevelCategory(logo.category_guid) : ''}\n merchantGuid={logo.merchant_guid}\n size={ROW_LOGO_SIZE}\n />\n )\n }\n\n if (logo.institution_guid) {\n return (\n <InstitutionLogo\n alt={logo.institution_name ?? ''}\n institutionGuid={logo.institution_guid}\n size={ROW_LOGO_SIZE}\n />\n )\n }\n\n if (logo.category_guid) {\n const topLevelGuid = resolveTopLevelCategory(logo.category_guid)\n return (\n <Box data-testid={`category-icon-${topLevelGuid}`} sx={{ display: 'flex' }}>\n <CategoryIcon categoryGuid={topLevelGuid} size={ROW_LOGO_SIZE} />\n </Box>\n )\n }\n\n return undefined\n}\n\n/**\n * The `transaction_block`: rows the backend already localized, carried inline on\n * `instance_slot.data.series` (`logo`, `primary_text`, `secondary_text`, `amount`). Only the\n * amount is formatted here, because the contract sends it as a number. `instance_slot.variant`\n * picks the header and slot treatment from `./layout.ts`.\n *\n * This is the full/mini shape. The reduced widgets (micro, embedded) resolve to the row logo\n * alone, carried flat on `data.logo` with no `series`, and are drawn by `CompactInsightCard`.\n *\n * A header, when the variant shows one, comes from `instance_slot.data.header_text` (the\n * transaction date, or \"{count} transactions\"). It deliberately does *not* come from the first\n * row: on a `with_merchant` card a row's `secondary_text` is the category, so reading it here\n * rendered the category twice and dropped the date entirely.\n */\nexport const TransactionBlock = observer(({ payload }: TransactionBlockProps) => {\n const theme = useTheme()\n const { getTopLevelCategoryGuid } = useCategoryStore()\n const { data, variant } = payload.instance_slot\n const series = slot<InstanceSlotRow[]>(data, 'series')\n const headerText = slot<string>(data, 'header_text')\n\n if (!Array.isArray(series) || !series.length) return null\n\n // The plain row is the safe default: it adds nothing a wrong variant could misstate.\n const { background, cardVariant, showHeader } = resolveVariantConfig(\n getLayoutConfig(theme),\n variant,\n transactionBlockVariant.NoHeader,\n 'TransactionBlock',\n )\n const header = showHeader && typeof headerText === 'string' ? headerText : undefined\n\n return (\n <TransactionListCard\n background={background}\n header={header}\n variant={cardVariant}\n rows={series.map((row) => ({\n amount: typeof row.amount === 'number' ? formatCurrency(row.amount, '0,0.00') : '',\n leading: renderRowLogo(row, getTopLevelCategoryGuid),\n subtitle: row.secondary_text ?? '',\n title: row.primary_text ?? '',\n }))}\n />\n )\n})\n"],"mappings":";;;;;;;;;;;;;AAwBA,IAAM,IAAgB,IAEhB,IAAgB,KAAK,MAAM,IAAgB,KAAK,GAahD,IAAA,CAAiB,GAAsB,MAAsD;AACjG,QAAM,IAAO,EAAY,EAAI,MAAM,EAAI,YAAY;AAEnD,MAAK,GAEL;AAAA,QAAI,EAAK,UAEP,QACE,gBAAA,EAAC,GAAD;AAAA,MACE,IAAI;AAAA,QACF,YAAY;AAAA,QACZ,SAAS;AAAA,QACT,QAAQ;AAAA,QACR,gBAAgB;AAAA,QAChB,OAAO;AAAA,MACT;AAAA,MAEA,UAAA,gBAAA,EAAC,GAAD;AAAA,QAAM,MAAM,EAAK;AAAA,QAAW,MAAM;AAAA,QAAe,IAAI,EAAE,OAAO,EAAK,WAAW;AAAA,MAAI,CAAA;AAAA,IAC/E,CAAA;AAIT,QAAI,EAAK,cACP,QACE,gBAAA,EAAC,GAAD;AAAA,MACE,KAAK,EAAK,iBAAiB;AAAA,MAC3B,cAAc,EAAK,gBAAgB,EAAwB,EAAK,aAAa,IAAI;AAAA,MACjF,cAAc,EAAK;AAAA,MACnB,MAAM;AAAA,IACP,CAAA;AAIL,QAAI,EAAK,iBACP,QACE,gBAAA,EAAC,GAAD;AAAA,MACE,KAAK,EAAK,oBAAoB;AAAA,MAC9B,iBAAiB,EAAK;AAAA,MACtB,MAAM;AAAA,IACP,CAAA;AAIL,QAAI,EAAK,eAAe;AACtB,YAAM,IAAe,EAAwB,EAAK,aAAa;AAC/D,aACE,gBAAA,EAAC,GAAD;AAAA,QAAK,eAAa,iBAAiB,CAAA;AAAA,QAAgB,IAAI,EAAE,SAAS,OAAO;AAAA,QACvE,UAAA,gBAAA,EAAC,GAAD;AAAA,UAAc,cAAc;AAAA,UAAc,MAAM;AAAA,QAAgB,CAAA;AAAA,MAC7D,CAAA;AAAA,IAET;AAAA;AAGF,GAgBa,IAAmB,EAAA,CAAU,EAAE,SAAA,EAAA,MAAqC;AAC/E,QAAM,IAAQ,EAAS,GACjB,EAAE,yBAAA,EAAA,IAA4B,EAAiB,GAC/C,EAAE,MAAA,GAAM,SAAA,EAAA,IAAY,EAAQ,eAC5B,IAAS,EAAwB,GAAM,QAAQ,GAC/C,IAAa,EAAa,GAAM,aAAa;AAEnD,MAAI,CAAC,MAAM,QAAQ,CAAM,KAAK,CAAC,EAAO,OAAQ,QAAO;AAGrD,QAAM,EAAE,YAAA,GAAY,aAAA,GAAa,YAAA,EAAA,IAAe,EAC9C,EAAgB,CAAK,GACrB,GACA,EAAwB,UACxB,kBACF;AAGA,SACE,gBAAA,EAAC,GAAD;AAAA,IACc,YAAA;AAAA,IACJ,QALG,KAAc,OAAO,KAAe,WAAW,IAAa;AAAA,IAMvE,SAAS;AAAA,IACT,MAAM,EAAO,IAAA,CAAK,OAAS;AAAA,MACzB,QAAQ,OAAO,EAAI,UAAW,WAAW,EAAe,EAAI,QAAQ,QAAQ,IAAI;AAAA,MAChF,SAAS,EAAc,GAAK,CAAuB;AAAA,MACnD,UAAU,EAAI,kBAAkB;AAAA,MAChC,OAAO,EAAI,gBAAgB;AAAA,IAC7B,EAAE;AAAA,EACH,CAAA;AAEL,CAAC"}
1
+ {"version":3,"file":"TransactionBlock.es.js","names":[],"sources":["../../../../../src/insights-v2/blocks/ComponentBlocks/TransactionBlock/TransactionBlock.tsx"],"sourcesContent":["import { observer } from 'mobx-react-lite'\n\nimport Box from '@mui/material/Box'\nimport { useTheme } from '@mui/material/styles'\n\nimport { CategoryIcon, InstitutionLogo, MerchantLogo } from '@mxenabled/mxui'\nimport { Icon } from '@mxenabled/mx-icons'\n\nimport { useCategoryStore } from '../../../../common'\nimport { slot } from '../../../../core'\nimport type { InsightsPayload, InstanceSlotRow, LogoRef } from '../../../../core'\nimport { formatCurrency } from '../../../../core/utils/NumberFormatting'\n\nimport LogoFromGuid from '../../../components/LogoFromGuid'\nimport StatusMessageCard from '../../../components/StatusMessageCard'\nimport TransactionListCard from '../../../components/TransactionListCard'\nimport { logoFromRef } from '../../../components/shared/EntityLogo'\n\nimport { resolveVariantConfig } from '../../resolveVariantConfig'\nimport { getLayoutConfig, transactionBlockVariant } from './layout'\n\ninterface TransactionBlockProps {\n payload: InsightsPayload\n beatGuid?: string\n}\n\nconst ROW_LOGO_SIZE = 32\n// Same glyph-to-tile ratio mxui's `CategoryIcon` uses, so a status icon sits like the other logos.\nconst ROW_ICON_SIZE = Math.round(ROW_LOGO_SIZE * 0.625)\nconst STATUS_ICON_SIZE = 20\n\n/**\n * Renders the row's leading logo from its `LogoRef`: a status icon, or an entity guid whose prefix\n * names the entity. An unrecognized prefix renders no logo rather than guessing.\n *\n * `resolveTopLevelCategory`: mxui's `CategoryIcon` only knows the top-level category guids and\n * silently falls back to the Uncategorized icon for a sub-category. The details drawer avoids\n * this by passing `transaction.top_level_category_guid`; the row only has the raw guid, so it is\n * walked up to its parent here (identity until categories load). That applies both to a `CAT-`\n * row logo and to a merchant's `fallback_guid`, which `MerchantLogo` draws through the same\n * `CategoryIcon` when the merchant image fails to load.\n */\nconst renderRowLogo = (row: InstanceSlotRow, resolveTopLevelCategory: (guid: string) => string) => {\n const logo = logoFromRef(row.logo, row.primary_text)\n\n if (!logo) return undefined\n\n if (logo.logo_name) {\n // A fixed box the size of the other logos keeps the row's text column aligned.\n return (\n <Box\n sx={{\n alignItems: 'center',\n display: 'flex',\n height: ROW_LOGO_SIZE,\n justifyContent: 'center',\n width: ROW_LOGO_SIZE,\n }}\n >\n <Icon name={logo.logo_name} size={ROW_ICON_SIZE} sx={{ color: logo.logo_color }} />\n </Box>\n )\n }\n\n if (logo.merchant_guid) {\n return (\n <MerchantLogo\n alt={logo.merchant_name ?? ''}\n categoryGuid={logo.category_guid ? resolveTopLevelCategory(logo.category_guid) : ''}\n merchantGuid={logo.merchant_guid}\n size={ROW_LOGO_SIZE}\n />\n )\n }\n\n if (logo.institution_guid) {\n return (\n <InstitutionLogo\n alt={logo.institution_name ?? ''}\n institutionGuid={logo.institution_guid}\n size={ROW_LOGO_SIZE}\n />\n )\n }\n\n if (logo.category_guid) {\n const topLevelGuid = resolveTopLevelCategory(logo.category_guid)\n return (\n <Box data-testid={`category-icon-${topLevelGuid}`} sx={{ display: 'flex' }}>\n <CategoryIcon categoryGuid={topLevelGuid} size={ROW_LOGO_SIZE} />\n </Box>\n )\n }\n\n return undefined\n}\n\n/**\n * The `transaction_block`: rows the backend already localized, carried inline on\n * `instance_slot.data.series` (`logo`, `primary_text`, `secondary_text`, `amount`). Only the\n * amount is formatted here, because the contract sends it as a number. `instance_slot.variant`\n * picks the header and slot treatment from `./layout.ts`.\n *\n * This is the full/mini shape. The reduced widgets (micro, embedded) resolve to the row logo\n * alone, carried flat on `data.logo` with no `series`, and are drawn by `CompactInsightCard`.\n *\n * `status_message` draws no rows: `data.message` beside the `data.icon` logo, as a\n * `StatusMessageCard` banner (Uncategorized Transactions V2 `complete`).\n *\n * A header, when the variant shows one, comes from `instance_slot.data.header_text` (the\n * transaction date, or \"{count} transactions\"). It deliberately does *not* come from the first\n * row: on a `with_merchant` card a row's `secondary_text` is the category, so reading it here\n * rendered the category twice and dropped the date entirely.\n */\nexport const TransactionBlock = observer(({ payload }: TransactionBlockProps) => {\n const theme = useTheme()\n const { getTopLevelCategoryGuid } = useCategoryStore()\n const { data, variant } = payload.instance_slot\n // The plain row is the safe default: it adds nothing a wrong variant could misstate.\n const { background, cardVariant, showHeader, statusMessage } = resolveVariantConfig(\n getLayoutConfig(theme),\n variant,\n transactionBlockVariant.NoHeader,\n 'TransactionBlock',\n )\n\n if (statusMessage) {\n const message = slot<string>(data, 'message')\n if (typeof message !== 'string' || !message.trim()) {\n console.warn('[TransactionBlock] status_message has no message — rendering nothing.')\n return null\n }\n\n // The icon only decorates the message, so it is hidden from the status announcement.\n return (\n <StatusMessageCard\n icon={\n <Box aria-hidden=\"true\" sx={{ display: 'flex' }}>\n <LogoFromGuid logo={slot<LogoRef>(data, 'icon')} size={STATUS_ICON_SIZE} />\n </Box>\n }\n message={message}\n />\n )\n }\n\n const series = slot<InstanceSlotRow[]>(data, 'series')\n const headerText = slot<string>(data, 'header_text')\n\n if (!Array.isArray(series) || !series.length) return null\n\n const header = showHeader && typeof headerText === 'string' ? headerText : undefined\n\n return (\n <TransactionListCard\n background={background}\n header={header}\n variant={cardVariant}\n rows={series.map((row) => ({\n amount: typeof row.amount === 'number' ? formatCurrency(row.amount, '0,0.00') : '',\n leading: renderRowLogo(row, getTopLevelCategoryGuid),\n subtitle: row.secondary_text ?? '',\n title: row.primary_text ?? '',\n }))}\n />\n )\n})\n"],"mappings":"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"}
@@ -9,6 +9,8 @@ import { Theme } from '@mui/material/styles';
9
9
  * - `InfoWash` — borderless row on the blue slot wash (e.g. Subscription Detected).
10
10
  * - `WarningWash` — borderless row on the warning slot wash (e.g. Unexpected
11
11
  * Subscription Payment). Treatment names, not beat names, so any beat can reuse the wash.
12
+ * - `StatusMessage` — no rows: an icon + message banner from `data.icon` / `data.message`
13
+ * (Uncategorized Transactions V2 `complete`, "All Categorized!").
12
14
  */
13
15
  export declare const transactionBlockVariant: {
14
16
  readonly WithHeader: "with_header";
@@ -16,6 +18,7 @@ export declare const transactionBlockVariant: {
16
18
  readonly UncategorizedTransaction: "uncategorized_transaction";
17
19
  readonly InfoWash: "info_wash";
18
20
  readonly WarningWash: "warning_wash";
21
+ readonly StatusMessage: "status_message";
19
22
  };
20
23
  export type TransactionBlockVariant = (typeof transactionBlockVariant)[keyof typeof transactionBlockVariant];
21
24
  export interface TransactionLayoutConfig {
@@ -25,6 +28,8 @@ export interface TransactionLayoutConfig {
25
28
  cardVariant?: 'default' | 'primary';
26
29
  /** CSS background for the slot behind the card; the card then renders borderless on paper. */
27
30
  background?: string;
31
+ /** Render `data.message` as a `StatusMessageCard` banner instead of the rows. */
32
+ statusMessage?: boolean;
28
33
  }
29
34
  /** Per-variant `TransactionListCard` props (mirrors DirectDepositBlock's `getLayoutConfig`). */
30
35
  export declare const getLayoutConfig: (theme: Theme) => Record<TransactionBlockVariant, TransactionLayoutConfig>;
@@ -1,11 +1,12 @@
1
- import { WARNING_WASH_GRADIENT as e, getPrimaryWashGradient as n } from "../../../components/celebrationGradients.es.js";
1
+ import { WARNING_WASH_GRADIENT as r, getPrimaryWashGradient as s } from "../../../components/celebrationGradients.es.js";
2
2
  var a = {
3
3
  WithHeader: "with_header",
4
4
  NoHeader: "no_header",
5
5
  UncategorizedTransaction: "uncategorized_transaction",
6
6
  InfoWash: "info_wash",
7
- WarningWash: "warning_wash"
8
- }, t = (r) => ({
7
+ WarningWash: "warning_wash",
8
+ StatusMessage: "status_message"
9
+ }, n = (e) => ({
9
10
  [a.WithHeader]: { showHeader: !0 },
10
11
  [a.NoHeader]: { showHeader: !1 },
11
12
  [a.UncategorizedTransaction]: {
@@ -14,15 +15,19 @@ var a = {
14
15
  },
15
16
  [a.InfoWash]: {
16
17
  showHeader: !1,
17
- background: n(r)
18
+ background: s(e)
18
19
  },
19
20
  [a.WarningWash]: {
20
21
  showHeader: !1,
21
- background: e
22
+ background: r
23
+ },
24
+ [a.StatusMessage]: {
25
+ showHeader: !1,
26
+ statusMessage: !0
22
27
  }
23
28
  });
24
29
  export {
25
- t as getLayoutConfig,
30
+ n as getLayoutConfig,
26
31
  a as transactionBlockVariant
27
32
  };
28
33
 
@@ -1 +1 @@
1
- {"version":3,"file":"layout.es.js","names":[],"sources":["../../../../../src/insights-v2/blocks/ComponentBlocks/TransactionBlock/layout.ts"],"sourcesContent":["import type { Theme } from '@mui/material/styles'\n\nimport {\n WARNING_WASH_GRADIENT,\n getPrimaryWashGradient,\n} from '../../../components/celebrationGradients'\n\n/**\n * Transaction block variants, keyed by the backend `instance_slot.variant`. All render the same\n * pre-localized rows through `TransactionListCard`; only the header and the slot differ.\n *\n * - `WithHeader` — row under a date header (Fee Detected, Large Transaction).\n * - `NoHeader` — the row alone (Large Transaction without a merchant).\n * - `UncategorizedTransaction` — filled primary header (\"{count} transactions\").\n * - `InfoWash` — borderless row on the blue slot wash (e.g. Subscription Detected).\n * - `WarningWash` — borderless row on the warning slot wash (e.g. Unexpected\n * Subscription Payment). Treatment names, not beat names, so any beat can reuse the wash.\n */\nexport const transactionBlockVariant = {\n WithHeader: 'with_header',\n NoHeader: 'no_header',\n UncategorizedTransaction: 'uncategorized_transaction',\n InfoWash: 'info_wash',\n WarningWash: 'warning_wash',\n} as const\n\nexport type TransactionBlockVariant =\n (typeof transactionBlockVariant)[keyof typeof transactionBlockVariant]\n\nexport interface TransactionLayoutConfig {\n /** Show `instance_slot.data.header_text` above the rows. */\n showHeader: boolean\n /** `TransactionListCard` style: grey utility header, or filled primary header. */\n cardVariant?: 'default' | 'primary'\n /** CSS background for the slot behind the card; the card then renders borderless on paper. */\n background?: string\n}\n\n/** Per-variant `TransactionListCard` props (mirrors DirectDepositBlock's `getLayoutConfig`). */\nexport const getLayoutConfig = (\n theme: Theme,\n): Record<TransactionBlockVariant, TransactionLayoutConfig> => ({\n [transactionBlockVariant.WithHeader]: { showHeader: true },\n [transactionBlockVariant.NoHeader]: { showHeader: false },\n [transactionBlockVariant.UncategorizedTransaction]: { showHeader: true, cardVariant: 'primary' },\n [transactionBlockVariant.InfoWash]: {\n showHeader: false,\n background: getPrimaryWashGradient(theme),\n },\n [transactionBlockVariant.WarningWash]: {\n showHeader: false,\n background: WARNING_WASH_GRADIENT,\n },\n})\n"],"mappings":";AAkBA,IAAa,IAA0B;AAAA,EACrC,YAAY;AAAA,EACZ,UAAU;AAAA,EACV,0BAA0B;AAAA,EAC1B,UAAU;AAAA,EACV,aAAa;AACf,GAea,IAAA,CACX,OAC8D;AAAA,EAC7D,CAAA,EAAwB,UAAA,GAAa,EAAE,YAAY,GAAK;AAAA,EACxD,CAAA,EAAwB,QAAA,GAAW,EAAE,YAAY,GAAM;AAAA,EACvD,CAAA,EAAwB,wBAAA,GAA2B;AAAA,IAAE,YAAY;AAAA,IAAM,aAAa;AAAA,EAAU;AAAA,EAC9F,CAAA,EAAwB,QAAA,GAAW;AAAA,IAClC,YAAY;AAAA,IACZ,YAAY,EAAuB,CAAK;AAAA,EAC1C;AAAA,EACC,CAAA,EAAwB,WAAA,GAAc;AAAA,IACrC,YAAY;AAAA,IACZ,YAAY;AAAA,EACd;AACF"}
1
+ {"version":3,"file":"layout.es.js","names":[],"sources":["../../../../../src/insights-v2/blocks/ComponentBlocks/TransactionBlock/layout.ts"],"sourcesContent":["import type { Theme } from '@mui/material/styles'\n\nimport {\n WARNING_WASH_GRADIENT,\n getPrimaryWashGradient,\n} from '../../../components/celebrationGradients'\n\n/**\n * Transaction block variants, keyed by the backend `instance_slot.variant`. All render the same\n * pre-localized rows through `TransactionListCard`; only the header and the slot differ.\n *\n * - `WithHeader` — row under a date header (Fee Detected, Large Transaction).\n * - `NoHeader` — the row alone (Large Transaction without a merchant).\n * - `UncategorizedTransaction` — filled primary header (\"{count} transactions\").\n * - `InfoWash` — borderless row on the blue slot wash (e.g. Subscription Detected).\n * - `WarningWash` — borderless row on the warning slot wash (e.g. Unexpected\n * Subscription Payment). Treatment names, not beat names, so any beat can reuse the wash.\n * - `StatusMessage` — no rows: an icon + message banner from `data.icon` / `data.message`\n * (Uncategorized Transactions V2 `complete`, \"All Categorized!\").\n */\nexport const transactionBlockVariant = {\n WithHeader: 'with_header',\n NoHeader: 'no_header',\n UncategorizedTransaction: 'uncategorized_transaction',\n InfoWash: 'info_wash',\n WarningWash: 'warning_wash',\n StatusMessage: 'status_message',\n} as const\n\nexport type TransactionBlockVariant =\n (typeof transactionBlockVariant)[keyof typeof transactionBlockVariant]\n\nexport interface TransactionLayoutConfig {\n /** Show `instance_slot.data.header_text` above the rows. */\n showHeader: boolean\n /** `TransactionListCard` style: grey utility header, or filled primary header. */\n cardVariant?: 'default' | 'primary'\n /** CSS background for the slot behind the card; the card then renders borderless on paper. */\n background?: string\n /** Render `data.message` as a `StatusMessageCard` banner instead of the rows. */\n statusMessage?: boolean\n}\n\n/** Per-variant `TransactionListCard` props (mirrors DirectDepositBlock's `getLayoutConfig`). */\nexport const getLayoutConfig = (\n theme: Theme,\n): Record<TransactionBlockVariant, TransactionLayoutConfig> => ({\n [transactionBlockVariant.WithHeader]: { showHeader: true },\n [transactionBlockVariant.NoHeader]: { showHeader: false },\n [transactionBlockVariant.UncategorizedTransaction]: { showHeader: true, cardVariant: 'primary' },\n [transactionBlockVariant.InfoWash]: {\n showHeader: false,\n background: getPrimaryWashGradient(theme),\n },\n [transactionBlockVariant.WarningWash]: {\n showHeader: false,\n background: WARNING_WASH_GRADIENT,\n },\n [transactionBlockVariant.StatusMessage]: { showHeader: false, statusMessage: true },\n})\n"],"mappings":";AAoBA,IAAa,IAA0B;AAAA,EACrC,YAAY;AAAA,EACZ,UAAU;AAAA,EACV,0BAA0B;AAAA,EAC1B,UAAU;AAAA,EACV,aAAa;AAAA,EACb,eAAe;AACjB,GAiBa,IAAA,CACX,OAC8D;AAAA,EAC7D,CAAA,EAAwB,UAAA,GAAa,EAAE,YAAY,GAAK;AAAA,EACxD,CAAA,EAAwB,QAAA,GAAW,EAAE,YAAY,GAAM;AAAA,EACvD,CAAA,EAAwB,wBAAA,GAA2B;AAAA,IAAE,YAAY;AAAA,IAAM,aAAa;AAAA,EAAU;AAAA,EAC9F,CAAA,EAAwB,QAAA,GAAW;AAAA,IAClC,YAAY;AAAA,IACZ,YAAY,EAAuB,CAAK;AAAA,EAC1C;AAAA,EACC,CAAA,EAAwB,WAAA,GAAc;AAAA,IACrC,YAAY;AAAA,IACZ,YAAY;AAAA,EACd;AAAA,EACC,CAAA,EAAwB,aAAA,GAAgB;AAAA,IAAE,YAAY;AAAA,IAAO,eAAe;AAAA,EAAK;AACpF"}
@@ -27,34 +27,34 @@ import mo from "./components/SaveAnExtraCard.es.js";
27
27
  import ao from "./blocks/ComponentBlocks/SaveExtraBlock/SaveExtraBlock.es.js";
28
28
  import fo from "./components/SavingsOpportunityCard.es.js";
29
29
  import no from "./blocks/ComponentBlocks/SavingsOpportunityBlock/SavingsOpportunityBlock.es.js";
30
- import { transactionBlockVariant as lo } from "./blocks/ComponentBlocks/TransactionBlock/layout.es.js";
31
- import { TransactionBlock as Bo } from "./blocks/ComponentBlocks/TransactionBlock/TransactionBlock.es.js";
32
- import Co from "./components/AmountPill.es.js";
33
- import ko from "./components/SubscriptionHeroCard.es.js";
34
- import ho from "./blocks/ComponentBlocks/UpcomingSubscriptionBlock/UpcomingSubscriptionBlock.es.js";
35
- import Ao from "./components/WithdrawalCard.es.js";
36
- import Lo from "./blocks/ComponentBlocks/WithdrawalBlock/WithdrawalBlock.es.js";
37
- import { SVGImageBlock as Io } from "./blocks/ImageBlocks/SVGImageBlock/SVGImageBlock.es.js";
38
- import Ro from "./components/shared/StatusSnackbar.es.js";
39
- import Oo from "./components/FeedbackDialog.es.js";
40
- import yo from "./components/FeedbackModal.es.js";
41
- import Mo from "./components/ConnectionDetailDrillDown.es.js";
42
- import _o from "./components/SurveyModal.es.js";
43
- import Vo from "./components/InsightErrorCard.es.js";
44
- import { ErrorCard as Go } from "./components/ErrorCard.es.js";
45
- import No from "./components/BadgedTile.es.js";
46
- import { OverflowMenu as jo } from "./components/OverflowMenu.es.js";
47
- import { InsightOptionsMenu as zo } from "./components/InsightOptionsMenu.es.js";
48
- import Ko from "./components/StatusBadge.es.js";
49
- import Xo from "./components/CompactInsightCard.es.js";
50
- import Zo from "./components/DesignateEmergencySavingsCard.es.js";
51
- import { FeedbackBar as or } from "./components/FeedbackBar.es.js";
52
- import { DismissInsightDialog as tr } from "./components/DismissInsightDialog.es.js";
53
- import { HiddenConfirmationCard as ir } from "./components/HiddenConfirmationCard.es.js";
54
- import { LoadingCard as pr } from "./components/LoadingCard.es.js";
55
- import { ObsolesceBanner as er } from "./components/ObsolesceBanner.es.js";
56
- import cr from "./components/BaseLayout.es.js";
57
- import sr from "./components/StatusMessageCard.es.js";
30
+ import lo from "./components/StatusMessageCard.es.js";
31
+ import { transactionBlockVariant as Bo } from "./blocks/ComponentBlocks/TransactionBlock/layout.es.js";
32
+ import { TransactionBlock as Co } from "./blocks/ComponentBlocks/TransactionBlock/TransactionBlock.es.js";
33
+ import ko from "./components/AmountPill.es.js";
34
+ import ho from "./components/SubscriptionHeroCard.es.js";
35
+ import Ao from "./blocks/ComponentBlocks/UpcomingSubscriptionBlock/UpcomingSubscriptionBlock.es.js";
36
+ import Lo from "./components/WithdrawalCard.es.js";
37
+ import Io from "./blocks/ComponentBlocks/WithdrawalBlock/WithdrawalBlock.es.js";
38
+ import { SVGImageBlock as Ro } from "./blocks/ImageBlocks/SVGImageBlock/SVGImageBlock.es.js";
39
+ import Oo from "./components/shared/StatusSnackbar.es.js";
40
+ import yo from "./components/FeedbackDialog.es.js";
41
+ import Mo from "./components/FeedbackModal.es.js";
42
+ import _o from "./components/ConnectionDetailDrillDown.es.js";
43
+ import Vo from "./components/SurveyModal.es.js";
44
+ import Go from "./components/InsightErrorCard.es.js";
45
+ import { ErrorCard as No } from "./components/ErrorCard.es.js";
46
+ import jo from "./components/BadgedTile.es.js";
47
+ import { OverflowMenu as zo } from "./components/OverflowMenu.es.js";
48
+ import { InsightOptionsMenu as Ko } from "./components/InsightOptionsMenu.es.js";
49
+ import Xo from "./components/StatusBadge.es.js";
50
+ import Zo from "./components/CompactInsightCard.es.js";
51
+ import or from "./components/DesignateEmergencySavingsCard.es.js";
52
+ import { FeedbackBar as tr } from "./components/FeedbackBar.es.js";
53
+ import { DismissInsightDialog as ir } from "./components/DismissInsightDialog.es.js";
54
+ import { HiddenConfirmationCard as pr } from "./components/HiddenConfirmationCard.es.js";
55
+ import { LoadingCard as er } from "./components/LoadingCard.es.js";
56
+ import { ObsolesceBanner as cr } from "./components/ObsolesceBanner.es.js";
57
+ import sr from "./components/BaseLayout.es.js";
58
58
  import Br from "./components/LogoTile.es.js";
59
59
  import Cr from "./components/LogoClusterCard.es.js";
60
60
  import kr from "./components/MerchantHighlightCard.es.js";
@@ -63,68 +63,68 @@ export {
63
63
  P as AccountBlock,
64
64
  R as AccountHeroCard,
65
65
  x as AccountSwitchBlock,
66
- Co as AmountPill,
66
+ ko as AmountPill,
67
67
  f as BAR_ARIA_LABEL,
68
68
  e as BAR_CHART_VARIANTS,
69
- No as BadgedTile,
69
+ jo as BadgedTile,
70
70
  k as BarchartBlock,
71
- cr as BaseLayout,
71
+ sr as BaseLayout,
72
72
  W as BudgetBlock,
73
- Xo as CompactInsightCard,
74
- Mo as ConnectionDetailDrillDown,
73
+ Zo as CompactInsightCard,
74
+ _o as ConnectionDetailDrillDown,
75
75
  q as DebtPayoffCard,
76
76
  Y as DebtsBlock,
77
- Zo as DesignateEmergencySavingsCard,
77
+ or as DesignateEmergencySavingsCard,
78
78
  U as DirectDepositBlock,
79
79
  O as DirectDepositCard,
80
- tr as DismissInsightDialog,
80
+ ir as DismissInsightDialog,
81
81
  L as DonutChartBlock,
82
82
  h as DoubleBarChartBlock,
83
83
  I as DoubleProgressBarBlock,
84
- Go as ErrorCard,
85
- or as FeedbackBar,
86
- Oo as FeedbackDialog,
87
- yo as FeedbackModal,
84
+ No as ErrorCard,
85
+ tr as FeedbackBar,
86
+ yo as FeedbackDialog,
87
+ Mo as FeedbackModal,
88
88
  d as HOST_ACTIONS,
89
- ir as HiddenConfirmationCard,
90
- Vo as InsightErrorCard,
91
- zo as InsightOptionsMenu,
89
+ pr as HiddenConfirmationCard,
90
+ Go as InsightErrorCard,
91
+ Ko as InsightOptionsMenu,
92
92
  J as InsightTransactionRow,
93
- pr as LoadingCard,
93
+ er as LoadingCard,
94
94
  Cr as LogoClusterCard,
95
95
  y as LogoFromGuid,
96
96
  Br as LogoTile,
97
97
  kr as MerchantHighlightCard,
98
- er as ObsolesceBanner,
99
- jo as OverflowMenu,
98
+ cr as ObsolesceBanner,
99
+ zo as OverflowMenu,
100
100
  hr as P2PLogoStack,
101
101
  ro as RepeatingTransactionBlock,
102
- Io as SVGImageBlock,
102
+ Ro as SVGImageBlock,
103
103
  mo as SaveAnExtraCard,
104
104
  ao as SaveExtraBlock,
105
105
  no as SavingsOpportunityBlock,
106
106
  fo as SavingsOpportunityCard,
107
- Ko as StatusBadge,
108
- sr as StatusMessageCard,
107
+ Xo as StatusBadge,
108
+ lo as StatusMessageCard,
109
109
  r as StatusPill,
110
- Ro as StatusSnackbar,
110
+ Oo as StatusSnackbar,
111
111
  A as StepChartBlock,
112
- ko as SubscriptionHeroCard,
113
- _o as SurveyModal,
114
- Bo as TransactionBlock,
112
+ ho as SubscriptionHeroCard,
113
+ Vo as SurveyModal,
114
+ Co as TransactionBlock,
115
115
  Q as TransactionListCard,
116
116
  F as TransferLogoCard,
117
117
  ro as UpcomingBillBlock,
118
118
  $ as UpcomingBillCard,
119
- ho as UpcomingSubscriptionBlock,
120
- Lo as WithdrawalBlock,
121
- Ao as WithdrawalCard,
119
+ Ao as UpcomingSubscriptionBlock,
120
+ Io as WithdrawalBlock,
121
+ Lo as WithdrawalCard,
122
122
  n as barChartVariant,
123
123
  c as buildChartData,
124
124
  l as buildDataSeries,
125
125
  E as isLogoGuid,
126
126
  m as resolveInsightRender,
127
- lo as transactionBlockVariant,
127
+ Bo as transactionBlockVariant,
128
128
  a as useBeatActions,
129
129
  g as useBeatCtaActions,
130
130
  C as useCtaHandler
@@ -9,6 +9,7 @@ export declare const TEMPLATE_NAMES: {
9
9
  QuarterlySummary: string;
10
10
  SpendingPlanCategorySpending: string;
11
11
  SubscriptionPriceIncrease: string;
12
+ SubscriptionPriceIncreaseV2: string;
12
13
  UncategorizedTransactionsV2: string;
13
14
  UpcomingBill: string;
14
15
  UnifiedDeposit: string;
@@ -8,6 +8,7 @@ var o = {
8
8
  QuarterlySummary: "QuarterlySummary",
9
9
  SpendingPlanCategorySpending: "SpendingPlanCategorySpending",
10
10
  SubscriptionPriceIncrease: "SubscriptionPriceIncrease",
11
+ SubscriptionPriceIncreaseV2: "SubscriptionPriceIncreaseV2",
11
12
  UncategorizedTransactionsV2: "UncategorizedTransactionsV2",
12
13
  UpcomingBill: "UpcomingBill",
13
14
  UnifiedDeposit: "UnifiedDeposit",
@@ -15,20 +16,20 @@ var o = {
15
16
  WeeklyNewMerchantsV2: "WeeklyNewMerchantsV2",
16
17
  MonthlySpendComparison: "MonthlySpendComparison",
17
18
  MonthlySpendToIncomeComparison: "MonthlySpendToIncomeComparison"
18
- }, a = window?.app?.clientConfig?.microwidget_instance_id || "", T = { INSIGHTS_MICRO_WIDGET: "/micro-insights-carousel" }, R = (e) => `on${e}Click`, i = (e) => `on${e}View`, A = (e) => `on${e}ViewFirstTime`, n = (e) => e.replace(/([a-z])([A-Z])/g, "$1 $2"), t = () => Object.values(o).reduce((e, C) => ({
19
+ }, a = window?.app?.clientConfig?.microwidget_instance_id || "", T = { INSIGHTS_MICRO_WIDGET: "/micro-insights-carousel" }, i = (e) => `on${e}Click`, R = (e) => `on${e}View`, A = (e) => `on${e}ViewFirstTime`, O = (e) => e.replace(/([a-z])([A-Z])/g, "$1 $2"), t = () => Object.values(o).reduce((e, C) => ({
19
20
  ...e,
20
- [R(C)]: {
21
+ [i(C)]: {
21
22
  action: E.MICRO_BEAT_CLICKED,
22
23
  category: I.BEAT_INTERACTION,
23
- label: n(C),
24
+ label: O(C),
24
25
  value: a
25
26
  }
26
27
  }), {}), l = () => Object.values(o).reduce((e, C) => ({
27
28
  ...e,
28
- [i(C)]: {
29
+ [R(C)]: {
29
30
  action: E.MICRO_BEAT_DISPLAYED,
30
31
  category: I.BEAT_INTERACTION,
31
- label: n(C),
32
+ label: O(C),
32
33
  value: a
33
34
  }
34
35
  }), {}), S = () => Object.values(o).reduce((e, C) => ({
@@ -36,7 +37,7 @@ var o = {
36
37
  [A(C)]: {
37
38
  action: E.MICRO_BEAT_DISPLAYED_FIRST_TIME,
38
39
  category: I.BEAT_INTERACTION,
39
- label: n(C),
40
+ label: O(C),
40
41
  value: a
41
42
  }
42
43
  }), {}), _ = {
@@ -47,7 +48,7 @@ var o = {
47
48
  }, I = {
48
49
  MICRO_WIDGET_INTERACTION: "Micro Widget Interaction",
49
50
  BEAT_INTERACTION: "Beat Interaction"
50
- }, O = {
51
+ }, n = {
51
52
  ON_CAROUSEL_BACK_CLICK: "onCarouselBackClick",
52
53
  ON_CAROUSEL_BACK_SWIPE: "onCarouselBackSwipe",
53
54
  ON_CAROUSEL_FORWARD_CLICK: "onCarouselForwardClick",
@@ -86,31 +87,31 @@ var o = {
86
87
  value: a
87
88
  }
88
89
  }, L = {
89
- [O.ON_CAROUSEL_BACK_CLICK]: {
90
+ [n.ON_CAROUSEL_BACK_CLICK]: {
90
91
  action: E.CONTROL_BACKWARD,
91
92
  category: I.MICRO_WIDGET_INTERACTION,
92
93
  label: _.CAROUSEL_CONTROL,
93
94
  value: a
94
95
  },
95
- [O.ON_CAROUSEL_FORWARD_CLICK]: {
96
+ [n.ON_CAROUSEL_FORWARD_CLICK]: {
96
97
  action: E.CONTROL_FORWARD,
97
98
  category: I.MICRO_WIDGET_INTERACTION,
98
99
  label: _.CAROUSEL_CONTROL,
99
100
  value: a
100
101
  },
101
- [O.ON_CAROUSEL_BACK_SWIPE]: {
102
+ [n.ON_CAROUSEL_BACK_SWIPE]: {
102
103
  action: E.SWIPE_BACKWARD,
103
104
  category: I.MICRO_WIDGET_INTERACTION,
104
105
  label: _.CAROUSEL_CONTROL,
105
106
  value: a
106
107
  },
107
- [O.ON_CAROUSEL_FORWARD_SWIPE]: {
108
+ [n.ON_CAROUSEL_FORWARD_SWIPE]: {
108
109
  action: E.SWIPE_FORWARD,
109
110
  category: I.MICRO_WIDGET_INTERACTION,
110
111
  label: _.CAROUSEL_CONTROL,
111
112
  value: a
112
113
  },
113
- [O.ON_VIEW_MORE_CLICKED]: {
114
+ [n.ON_VIEW_MORE_CLICKED]: {
114
115
  action: E.MICRO_BEAT_CLICKED,
115
116
  category: I.BEAT_INTERACTION,
116
117
  label: _.VIEW_MORE,
@@ -129,20 +130,20 @@ var o = {
129
130
  export {
130
131
  E as ANALYTICS_ACTIONS,
131
132
  I as ANALYTICS_CATEGORIES,
132
- O as ANALYTICS_CLICK_EVENTS,
133
+ n as ANALYTICS_CLICK_EVENTS,
133
134
  L as ANALYTICS_EVENTS,
134
135
  _ as ANALYTICS_LABELS,
135
136
  c as ANALYTICS_PAGEVIEWS,
136
137
  r as ANALYTICS_PAGE_NAMES,
137
138
  N as ANALYTICS_VIEW_EVENTS,
138
- R as ON_CLICK_EVENT,
139
- i as ON_VIEW_EVENT,
139
+ i as ON_CLICK_EVENT,
140
+ R as ON_VIEW_EVENT,
140
141
  A as ON_VIEW_FIRST_TIME_EVENT,
141
142
  o as TEMPLATE_NAMES,
142
143
  t as onBeatClickedEvents,
143
144
  l as onBeatDisplayedEvents,
144
145
  S as onBeatDisplayedForFirstTimeEvents,
145
- n as readableTemplateName
146
+ O as readableTemplateName
146
147
  };
147
148
 
148
149
  //# sourceMappingURL=Analytics.es.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"Analytics.es.js","names":[],"sources":["../../../src/microinsights/constants/Analytics.ts"],"sourcesContent":["import type { BasicAnalyticsEvent } from '../../core/types/Analytics'\n\nexport const TEMPLATE_NAMES = {\n BillAmountNotStandard: 'BillAmountNotStandard',\n CanadianUpcomingDeadlineAlert: 'CanadianUpcomingDeadlineAlert',\n DuplicatePaymentV2: 'DuplicatePaymentV2',\n IntroducePulse: 'IntroducePulse',\n LargeTransaction: 'LargeTransaction',\n MonthlySpendToIncomeComparisonV2: 'MonthlySpendToIncomeComparisonV2',\n QuarterlySummary: 'QuarterlySummary',\n SpendingPlanCategorySpending: 'SpendingPlanCategorySpending',\n SubscriptionPriceIncrease: 'SubscriptionPriceIncrease',\n UncategorizedTransactionsV2: 'UncategorizedTransactionsV2',\n UpcomingBill: 'UpcomingBill',\n UnifiedDeposit: 'UnifiedDeposit',\n WeeklySpendingPlanSummary: 'WeeklySpendingPlanSummary',\n WeeklyNewMerchantsV2: 'WeeklyNewMerchantsV2',\n MonthlySpendComparison: 'MonthlySpendComparison',\n MonthlySpendToIncomeComparison: 'MonthlySpendToIncomeComparison',\n}\n\nconst instanceId = (window as any)?.app?.clientConfig?.microwidget_instance_id || ''\n\nconst PATHS = {\n INSIGHTS_MICRO_WIDGET: '/micro-insights-carousel',\n}\n\nexport const ON_CLICK_EVENT = (name: string) => `on${name}Click`\nexport const ON_VIEW_EVENT = (name: string) => `on${name}View`\nexport const ON_VIEW_FIRST_TIME_EVENT = (name: string) => `on${name}ViewFirstTime`\nexport const readableTemplateName = (name: string) => name.replace(/([a-z])([A-Z])/g, '$1 $2')\nexport const onBeatClickedEvents = () => {\n return Object.values(TEMPLATE_NAMES).reduce(\n (acc, name) => ({\n ...acc,\n [ON_CLICK_EVENT(name)]: {\n action: ANALYTICS_ACTIONS.MICRO_BEAT_CLICKED,\n category: ANALYTICS_CATEGORIES.BEAT_INTERACTION,\n label: readableTemplateName(name),\n value: instanceId,\n },\n }),\n {},\n ) as Record<keyof AnalyticsEventsType, string>\n}\n\nexport const onBeatDisplayedEvents = () => {\n return Object.values(TEMPLATE_NAMES).reduce(\n (acc, name) => ({\n ...acc,\n [ON_VIEW_EVENT(name)]: {\n action: ANALYTICS_ACTIONS.MICRO_BEAT_DISPLAYED,\n category: ANALYTICS_CATEGORIES.BEAT_INTERACTION,\n label: readableTemplateName(name),\n value: instanceId,\n },\n }),\n {},\n ) as Record<keyof AnalyticsEventsType, string>\n}\n\nexport const onBeatDisplayedForFirstTimeEvents = () => {\n return Object.values(TEMPLATE_NAMES).reduce(\n (acc, name) => ({\n ...acc,\n [ON_VIEW_FIRST_TIME_EVENT(name)]: {\n action: ANALYTICS_ACTIONS.MICRO_BEAT_DISPLAYED_FIRST_TIME,\n category: ANALYTICS_CATEGORIES.BEAT_INTERACTION,\n label: readableTemplateName(name),\n value: instanceId,\n },\n }),\n {},\n ) as Record<keyof AnalyticsEventsType, string>\n}\n\nexport const ANALYTICS_LABELS = {\n CARD: 'Card',\n CAROUSEL_CONTROL: 'Carousel Control',\n MICRO_WIDGET: 'Micro Widget',\n VIEW_MORE: 'View More',\n}\n\nexport const ANALYTICS_CATEGORIES = {\n MICRO_WIDGET_INTERACTION: 'Micro Widget Interaction',\n BEAT_INTERACTION: 'Beat Interaction',\n}\n\nexport const ANALYTICS_CLICK_EVENTS = {\n ON_CAROUSEL_BACK_CLICK: 'onCarouselBackClick',\n ON_CAROUSEL_BACK_SWIPE: 'onCarouselBackSwipe',\n ON_CAROUSEL_FORWARD_CLICK: 'onCarouselForwardClick',\n ON_CAROUSEL_FORWARD_SWIPE: 'onCarouselForwardSwipe',\n ON_NO_RELEVANT_INSIGHTS_CLICKED: 'onNoRelevantInsightsClicked',\n ON_VIEW_MORE_CLICKED: 'onViewMoreClicked',\n}\n\nexport const ANALYTICS_VIEW_EVENTS = {\n ON_VIEW_MORE_VIEWED: 'onViewMoreCardView',\n}\n\nexport const ANALYTICS_ACTIONS = {\n CONTROL_BACKWARD: 'Control Backward',\n CONTROL_FORWARD: 'Control Forward',\n MICRO_BEAT_CLICKED: 'Micro Beat Clicked',\n MICRO_BEAT_DISPLAYED: 'Micro Beat Displayed',\n MICRO_BEAT_DISPLAYED_FIRST_TIME: 'Micro Beat Displayed For First Time',\n SWIPE_BACKWARD: 'Swipe Backward',\n SWIPE_FORWARD: 'Swipe Forward',\n}\n\nexport const ANALYTICS_PAGE_NAMES = {\n MICRO_WIDGET_CAROUSEL: 'Micro Widget Carousel',\n MICRO_WIDGET_CAROUSEL_ZERO_STATE: 'Micro Widget Carousel Zero State',\n MICRO_WIDGET_CAROUSEL_NO_RELEVANT_INSIGHTS: 'Micro Widget Carousel No Relevant Insights',\n}\n\nexport const ANALYTICS_PAGEVIEWS = {\n [ANALYTICS_PAGE_NAMES.MICRO_WIDGET_CAROUSEL]: {\n label: ANALYTICS_LABELS.MICRO_WIDGET,\n name: ANALYTICS_PAGE_NAMES.MICRO_WIDGET_CAROUSEL,\n path: PATHS.INSIGHTS_MICRO_WIDGET,\n value: instanceId,\n },\n // zero state\n [ANALYTICS_PAGE_NAMES.MICRO_WIDGET_CAROUSEL_ZERO_STATE]: {\n label: ANALYTICS_LABELS.MICRO_WIDGET,\n name: ANALYTICS_PAGE_NAMES.MICRO_WIDGET_CAROUSEL_ZERO_STATE,\n path: PATHS.INSIGHTS_MICRO_WIDGET,\n value: instanceId,\n },\n // no relevant cards\n [ANALYTICS_PAGE_NAMES.MICRO_WIDGET_CAROUSEL_NO_RELEVANT_INSIGHTS]: {\n label: ANALYTICS_LABELS.MICRO_WIDGET,\n name: ANALYTICS_PAGE_NAMES.MICRO_WIDGET_CAROUSEL_NO_RELEVANT_INSIGHTS,\n path: '/micro-widget',\n value: instanceId,\n },\n}\n\nexport const ANALYTICS_EVENTS = {\n // carousel control interaction events - clicks and swipes\n [ANALYTICS_CLICK_EVENTS.ON_CAROUSEL_BACK_CLICK]: {\n action: ANALYTICS_ACTIONS.CONTROL_BACKWARD,\n category: ANALYTICS_CATEGORIES.MICRO_WIDGET_INTERACTION,\n label: ANALYTICS_LABELS.CAROUSEL_CONTROL,\n value: instanceId,\n },\n [ANALYTICS_CLICK_EVENTS.ON_CAROUSEL_FORWARD_CLICK]: {\n action: ANALYTICS_ACTIONS.CONTROL_FORWARD,\n category: ANALYTICS_CATEGORIES.MICRO_WIDGET_INTERACTION,\n label: ANALYTICS_LABELS.CAROUSEL_CONTROL,\n value: instanceId,\n },\n [ANALYTICS_CLICK_EVENTS.ON_CAROUSEL_BACK_SWIPE]: {\n action: ANALYTICS_ACTIONS.SWIPE_BACKWARD,\n category: ANALYTICS_CATEGORIES.MICRO_WIDGET_INTERACTION,\n label: ANALYTICS_LABELS.CAROUSEL_CONTROL,\n value: instanceId,\n },\n [ANALYTICS_CLICK_EVENTS.ON_CAROUSEL_FORWARD_SWIPE]: {\n action: ANALYTICS_ACTIONS.SWIPE_FORWARD,\n category: ANALYTICS_CATEGORIES.MICRO_WIDGET_INTERACTION,\n label: ANALYTICS_LABELS.CAROUSEL_CONTROL,\n value: instanceId,\n },\n // read more card events\n [ANALYTICS_CLICK_EVENTS.ON_VIEW_MORE_CLICKED]: {\n action: ANALYTICS_ACTIONS.MICRO_BEAT_CLICKED,\n category: ANALYTICS_CATEGORIES.BEAT_INTERACTION,\n label: ANALYTICS_LABELS.VIEW_MORE,\n value: instanceId,\n },\n [ANALYTICS_VIEW_EVENTS.ON_VIEW_MORE_VIEWED]: {\n action: ANALYTICS_ACTIONS.MICRO_BEAT_DISPLAYED,\n category: ANALYTICS_CATEGORIES.BEAT_INTERACTION,\n label: ANALYTICS_LABELS.VIEW_MORE,\n value: instanceId,\n },\n\n ...onBeatClickedEvents(),\n ...onBeatDisplayedEvents(),\n ...onBeatDisplayedForFirstTimeEvents(),\n}\n\nexport interface AnalyticsEventsObjectType extends BasicAnalyticsEvent {\n value: string\n}\n\nexport type AnalyticsEventsType = {\n [key: string]: AnalyticsEventsObjectType\n}\n"],"mappings":"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"}
1
+ {"version":3,"file":"Analytics.es.js","names":[],"sources":["../../../src/microinsights/constants/Analytics.ts"],"sourcesContent":["import type { BasicAnalyticsEvent } from '../../core/types/Analytics'\n\nexport const TEMPLATE_NAMES = {\n BillAmountNotStandard: 'BillAmountNotStandard',\n CanadianUpcomingDeadlineAlert: 'CanadianUpcomingDeadlineAlert',\n DuplicatePaymentV2: 'DuplicatePaymentV2',\n IntroducePulse: 'IntroducePulse',\n LargeTransaction: 'LargeTransaction',\n MonthlySpendToIncomeComparisonV2: 'MonthlySpendToIncomeComparisonV2',\n QuarterlySummary: 'QuarterlySummary',\n SpendingPlanCategorySpending: 'SpendingPlanCategorySpending',\n SubscriptionPriceIncrease: 'SubscriptionPriceIncrease',\n SubscriptionPriceIncreaseV2: 'SubscriptionPriceIncreaseV2',\n UncategorizedTransactionsV2: 'UncategorizedTransactionsV2',\n UpcomingBill: 'UpcomingBill',\n UnifiedDeposit: 'UnifiedDeposit',\n WeeklySpendingPlanSummary: 'WeeklySpendingPlanSummary',\n WeeklyNewMerchantsV2: 'WeeklyNewMerchantsV2',\n MonthlySpendComparison: 'MonthlySpendComparison',\n MonthlySpendToIncomeComparison: 'MonthlySpendToIncomeComparison',\n}\n\nconst instanceId = (window as any)?.app?.clientConfig?.microwidget_instance_id || ''\n\nconst PATHS = {\n INSIGHTS_MICRO_WIDGET: '/micro-insights-carousel',\n}\n\nexport const ON_CLICK_EVENT = (name: string) => `on${name}Click`\nexport const ON_VIEW_EVENT = (name: string) => `on${name}View`\nexport const ON_VIEW_FIRST_TIME_EVENT = (name: string) => `on${name}ViewFirstTime`\nexport const readableTemplateName = (name: string) => name.replace(/([a-z])([A-Z])/g, '$1 $2')\nexport const onBeatClickedEvents = () => {\n return Object.values(TEMPLATE_NAMES).reduce(\n (acc, name) => ({\n ...acc,\n [ON_CLICK_EVENT(name)]: {\n action: ANALYTICS_ACTIONS.MICRO_BEAT_CLICKED,\n category: ANALYTICS_CATEGORIES.BEAT_INTERACTION,\n label: readableTemplateName(name),\n value: instanceId,\n },\n }),\n {},\n ) as Record<keyof AnalyticsEventsType, string>\n}\n\nexport const onBeatDisplayedEvents = () => {\n return Object.values(TEMPLATE_NAMES).reduce(\n (acc, name) => ({\n ...acc,\n [ON_VIEW_EVENT(name)]: {\n action: ANALYTICS_ACTIONS.MICRO_BEAT_DISPLAYED,\n category: ANALYTICS_CATEGORIES.BEAT_INTERACTION,\n label: readableTemplateName(name),\n value: instanceId,\n },\n }),\n {},\n ) as Record<keyof AnalyticsEventsType, string>\n}\n\nexport const onBeatDisplayedForFirstTimeEvents = () => {\n return Object.values(TEMPLATE_NAMES).reduce(\n (acc, name) => ({\n ...acc,\n [ON_VIEW_FIRST_TIME_EVENT(name)]: {\n action: ANALYTICS_ACTIONS.MICRO_BEAT_DISPLAYED_FIRST_TIME,\n category: ANALYTICS_CATEGORIES.BEAT_INTERACTION,\n label: readableTemplateName(name),\n value: instanceId,\n },\n }),\n {},\n ) as Record<keyof AnalyticsEventsType, string>\n}\n\nexport const ANALYTICS_LABELS = {\n CARD: 'Card',\n CAROUSEL_CONTROL: 'Carousel Control',\n MICRO_WIDGET: 'Micro Widget',\n VIEW_MORE: 'View More',\n}\n\nexport const ANALYTICS_CATEGORIES = {\n MICRO_WIDGET_INTERACTION: 'Micro Widget Interaction',\n BEAT_INTERACTION: 'Beat Interaction',\n}\n\nexport const ANALYTICS_CLICK_EVENTS = {\n ON_CAROUSEL_BACK_CLICK: 'onCarouselBackClick',\n ON_CAROUSEL_BACK_SWIPE: 'onCarouselBackSwipe',\n ON_CAROUSEL_FORWARD_CLICK: 'onCarouselForwardClick',\n ON_CAROUSEL_FORWARD_SWIPE: 'onCarouselForwardSwipe',\n ON_NO_RELEVANT_INSIGHTS_CLICKED: 'onNoRelevantInsightsClicked',\n ON_VIEW_MORE_CLICKED: 'onViewMoreClicked',\n}\n\nexport const ANALYTICS_VIEW_EVENTS = {\n ON_VIEW_MORE_VIEWED: 'onViewMoreCardView',\n}\n\nexport const ANALYTICS_ACTIONS = {\n CONTROL_BACKWARD: 'Control Backward',\n CONTROL_FORWARD: 'Control Forward',\n MICRO_BEAT_CLICKED: 'Micro Beat Clicked',\n MICRO_BEAT_DISPLAYED: 'Micro Beat Displayed',\n MICRO_BEAT_DISPLAYED_FIRST_TIME: 'Micro Beat Displayed For First Time',\n SWIPE_BACKWARD: 'Swipe Backward',\n SWIPE_FORWARD: 'Swipe Forward',\n}\n\nexport const ANALYTICS_PAGE_NAMES = {\n MICRO_WIDGET_CAROUSEL: 'Micro Widget Carousel',\n MICRO_WIDGET_CAROUSEL_ZERO_STATE: 'Micro Widget Carousel Zero State',\n MICRO_WIDGET_CAROUSEL_NO_RELEVANT_INSIGHTS: 'Micro Widget Carousel No Relevant Insights',\n}\n\nexport const ANALYTICS_PAGEVIEWS = {\n [ANALYTICS_PAGE_NAMES.MICRO_WIDGET_CAROUSEL]: {\n label: ANALYTICS_LABELS.MICRO_WIDGET,\n name: ANALYTICS_PAGE_NAMES.MICRO_WIDGET_CAROUSEL,\n path: PATHS.INSIGHTS_MICRO_WIDGET,\n value: instanceId,\n },\n // zero state\n [ANALYTICS_PAGE_NAMES.MICRO_WIDGET_CAROUSEL_ZERO_STATE]: {\n label: ANALYTICS_LABELS.MICRO_WIDGET,\n name: ANALYTICS_PAGE_NAMES.MICRO_WIDGET_CAROUSEL_ZERO_STATE,\n path: PATHS.INSIGHTS_MICRO_WIDGET,\n value: instanceId,\n },\n // no relevant cards\n [ANALYTICS_PAGE_NAMES.MICRO_WIDGET_CAROUSEL_NO_RELEVANT_INSIGHTS]: {\n label: ANALYTICS_LABELS.MICRO_WIDGET,\n name: ANALYTICS_PAGE_NAMES.MICRO_WIDGET_CAROUSEL_NO_RELEVANT_INSIGHTS,\n path: '/micro-widget',\n value: instanceId,\n },\n}\n\nexport const ANALYTICS_EVENTS = {\n // carousel control interaction events - clicks and swipes\n [ANALYTICS_CLICK_EVENTS.ON_CAROUSEL_BACK_CLICK]: {\n action: ANALYTICS_ACTIONS.CONTROL_BACKWARD,\n category: ANALYTICS_CATEGORIES.MICRO_WIDGET_INTERACTION,\n label: ANALYTICS_LABELS.CAROUSEL_CONTROL,\n value: instanceId,\n },\n [ANALYTICS_CLICK_EVENTS.ON_CAROUSEL_FORWARD_CLICK]: {\n action: ANALYTICS_ACTIONS.CONTROL_FORWARD,\n category: ANALYTICS_CATEGORIES.MICRO_WIDGET_INTERACTION,\n label: ANALYTICS_LABELS.CAROUSEL_CONTROL,\n value: instanceId,\n },\n [ANALYTICS_CLICK_EVENTS.ON_CAROUSEL_BACK_SWIPE]: {\n action: ANALYTICS_ACTIONS.SWIPE_BACKWARD,\n category: ANALYTICS_CATEGORIES.MICRO_WIDGET_INTERACTION,\n label: ANALYTICS_LABELS.CAROUSEL_CONTROL,\n value: instanceId,\n },\n [ANALYTICS_CLICK_EVENTS.ON_CAROUSEL_FORWARD_SWIPE]: {\n action: ANALYTICS_ACTIONS.SWIPE_FORWARD,\n category: ANALYTICS_CATEGORIES.MICRO_WIDGET_INTERACTION,\n label: ANALYTICS_LABELS.CAROUSEL_CONTROL,\n value: instanceId,\n },\n // read more card events\n [ANALYTICS_CLICK_EVENTS.ON_VIEW_MORE_CLICKED]: {\n action: ANALYTICS_ACTIONS.MICRO_BEAT_CLICKED,\n category: ANALYTICS_CATEGORIES.BEAT_INTERACTION,\n label: ANALYTICS_LABELS.VIEW_MORE,\n value: instanceId,\n },\n [ANALYTICS_VIEW_EVENTS.ON_VIEW_MORE_VIEWED]: {\n action: ANALYTICS_ACTIONS.MICRO_BEAT_DISPLAYED,\n category: ANALYTICS_CATEGORIES.BEAT_INTERACTION,\n label: ANALYTICS_LABELS.VIEW_MORE,\n value: instanceId,\n },\n\n ...onBeatClickedEvents(),\n ...onBeatDisplayedEvents(),\n ...onBeatDisplayedForFirstTimeEvents(),\n}\n\nexport interface AnalyticsEventsObjectType extends BasicAnalyticsEvent {\n value: string\n}\n\nexport type AnalyticsEventsType = {\n [key: string]: AnalyticsEventsObjectType\n}\n"],"mappings":"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"}
@@ -23,6 +23,7 @@ var e = [
23
23
  "SavingsOpportunityV2",
24
24
  "SubscriptionDetected",
25
25
  "SubscriptionPriceIncrease",
26
+ "SubscriptionPriceIncreaseV2",
26
27
  "SetUpDirectDeposit",
27
28
  "SwitchDirectDeposit",
28
29
  "UnexpectedSubscriptionPayment",
@@ -1 +1 @@
1
- {"version":3,"file":"TrendsInsights.es.js","names":[],"sources":["../../../src/trends/constants/TrendsInsights.ts"],"sourcesContent":["export const TRENDS_BEAT_TEMPLATES = [\n 'BillAmountNotStandard',\n 'CategorySpendingV2',\n 'CostOfLivingToIncome',\n 'DebtPaymentReminderV2',\n 'DiscoveredAccounts',\n 'DuplicatePaymentV2',\n 'FeeDetected',\n 'GreenGasPurchasesSummary',\n 'LargeTransaction',\n 'LowAccountBalance',\n 'MonthlyDebtToIncomeComparisonV2',\n 'MonthlyDepositSummaryV2',\n 'MonthlyNonEssentialCategorySummaryV2',\n 'MonthlySavingsToIncomeComparison',\n 'MonthlySpendToIncomeComparisonV2',\n 'MonthlySubscriptionAggregateV2',\n 'MonthlyTopMerchantSpendingV3',\n 'MonthlyObligationsStatus',\n 'QuarterlySummary',\n 'SaveAnExtra100Dollars',\n 'SaveEnoughToLiveOn',\n 'SavingsOpportunityV2',\n 'SubscriptionDetected',\n 'SubscriptionPriceIncrease',\n 'SetUpDirectDeposit',\n 'SwitchDirectDeposit',\n 'UnexpectedSubscriptionPayment',\n 'UpcomingBill',\n 'UpcomingSubscription',\n 'WeekendSpendingSummaryV2',\n 'WeeklyNewMerchantsV2',\n 'WeeklyNoSpendDays',\n 'WeeklySmallPurchasesSummary',\n]\n"],"mappings":"AAAA,IAAa,IAAwB;AAAA,EACnC;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AACF"}
1
+ {"version":3,"file":"TrendsInsights.es.js","names":[],"sources":["../../../src/trends/constants/TrendsInsights.ts"],"sourcesContent":["export const TRENDS_BEAT_TEMPLATES = [\n 'BillAmountNotStandard',\n 'CategorySpendingV2',\n 'CostOfLivingToIncome',\n 'DebtPaymentReminderV2',\n 'DiscoveredAccounts',\n 'DuplicatePaymentV2',\n 'FeeDetected',\n 'GreenGasPurchasesSummary',\n 'LargeTransaction',\n 'LowAccountBalance',\n 'MonthlyDebtToIncomeComparisonV2',\n 'MonthlyDepositSummaryV2',\n 'MonthlyNonEssentialCategorySummaryV2',\n 'MonthlySavingsToIncomeComparison',\n 'MonthlySpendToIncomeComparisonV2',\n 'MonthlySubscriptionAggregateV2',\n 'MonthlyTopMerchantSpendingV3',\n 'MonthlyObligationsStatus',\n 'QuarterlySummary',\n 'SaveAnExtra100Dollars',\n 'SaveEnoughToLiveOn',\n 'SavingsOpportunityV2',\n 'SubscriptionDetected',\n 'SubscriptionPriceIncrease',\n 'SubscriptionPriceIncreaseV2',\n 'SetUpDirectDeposit',\n 'SwitchDirectDeposit',\n 'UnexpectedSubscriptionPayment',\n 'UpcomingBill',\n 'UpcomingSubscription',\n 'WeekendSpendingSummaryV2',\n 'WeeklyNewMerchantsV2',\n 'WeeklyNoSpendDays',\n 'WeeklySmallPurchasesSummary',\n]\n"],"mappings":"AAAA,IAAa,IAAwB;AAAA,EACnC;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AACF"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mx-cartographer/experiences",
3
- "version": "9.7.11",
3
+ "version": "9.7.13",
4
4
  "description": "Library containing experience widgets",
5
5
  "author": "MX",
6
6
  "license": "MIT",