@mx-cartographer/experiences 9.4.69 → 9.4.71

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 (42) hide show
  1. package/CHANGELOG.md +14 -0
  2. package/dist/common/utils/PostMessage.d.ts +5 -1
  3. package/dist/common/utils/PostMessage.es.js +26 -24
  4. package/dist/common/utils/PostMessage.es.js.map +1 -1
  5. package/dist/core/types/Insights.d.ts +25 -0
  6. package/dist/core/types/index.d.ts +1 -1
  7. package/dist/insights-v2/blocks/ComponentBlocks/DirectDepositBlock/DirectDepositBlock.d.ts +16 -0
  8. package/dist/insights-v2/blocks/ComponentBlocks/DirectDepositBlock/DirectDepositBlock.es.js +24 -0
  9. package/dist/insights-v2/blocks/ComponentBlocks/DirectDepositBlock/DirectDepositBlock.es.js.map +1 -0
  10. package/dist/insights-v2/blocks/ComponentBlocks/DirectDepositBlock/index.d.ts +1 -0
  11. package/dist/insights-v2/blocks/ComponentBlocks/DirectDepositBlock/layout.d.ts +28 -0
  12. package/dist/insights-v2/blocks/ComponentBlocks/DirectDepositBlock/layout.es.js +63 -0
  13. package/dist/insights-v2/blocks/ComponentBlocks/DirectDepositBlock/layout.es.js.map +1 -0
  14. package/dist/insights-v2/blocks/ComponentBlocks/index.d.ts +1 -0
  15. package/dist/insights-v2/components/AccountHeroCard.d.ts +7 -1
  16. package/dist/insights-v2/components/AccountHeroCard.es.js +6 -7
  17. package/dist/insights-v2/components/AccountHeroCard.es.js.map +1 -1
  18. package/dist/insights-v2/components/BaseLayout.es.js.map +1 -1
  19. package/dist/insights-v2/components/DirectDepositCard.d.ts +48 -0
  20. package/dist/insights-v2/components/DirectDepositCard.es.js +37 -0
  21. package/dist/insights-v2/components/DirectDepositCard.es.js.map +1 -0
  22. package/dist/insights-v2/components/TransferLogoCard.d.ts +5 -0
  23. package/dist/insights-v2/components/TransferLogoCard.es.js +37 -55
  24. package/dist/insights-v2/components/TransferLogoCard.es.js.map +1 -1
  25. package/dist/insights-v2/components/shared/ConfettiOverlay.d.ts +1 -0
  26. package/dist/insights-v2/components/shared/ConfettiOverlay.es.js +27 -0
  27. package/dist/insights-v2/components/shared/ConfettiOverlay.es.js.map +1 -0
  28. package/dist/insights-v2/ctaActions/ctaConfig.d.ts +3 -2
  29. package/dist/insights-v2/ctaActions/ctaConfig.es.js.map +1 -1
  30. package/dist/insights-v2/ctaActions/ctaPostMessages.d.ts +16 -0
  31. package/dist/insights-v2/ctaActions/ctaPostMessages.es.js +51 -0
  32. package/dist/insights-v2/ctaActions/ctaPostMessages.es.js.map +1 -0
  33. package/dist/insights-v2/ctaActions/index.d.ts +1 -0
  34. package/dist/insights-v2/ctaActions/runCtaAction.d.ts +5 -1
  35. package/dist/insights-v2/ctaActions/runCtaAction.es.js +54 -51
  36. package/dist/insights-v2/ctaActions/runCtaAction.es.js.map +1 -1
  37. package/dist/insights-v2/ctaActions/types.d.ts +1 -1
  38. package/dist/insights-v2/index.d.ts +1 -0
  39. package/dist/insights-v2/index.es.js +70 -66
  40. package/dist/insights-v2/mappings/blocks.es.js +34 -32
  41. package/dist/insights-v2/mappings/blocks.es.js.map +1 -1
  42. package/package.json +1 -1
@@ -1 +1 @@
1
- {"version":3,"file":"runCtaAction.es.js","names":[],"sources":["../../../src/insights-v2/ctaActions/runCtaAction.ts"],"sourcesContent":["import { sendBeatCta } from '../../common/utils/PostMessage'\nimport { hasDrawerBlock } from '../mappings/blocks'\nimport { ctaActions } from './ctaConfig'\nimport { ctaHandlers, type CtaHandlerName } from './ctaHandlers'\nimport { HOST_ACTIONS } from './hostActions'\nimport type {\n CtaContext,\n CtaEffect,\n CtaHandler,\n CtaHandlerContext,\n CtaState,\n CtaStateContext,\n CtaStep,\n RunHandlerOptions,\n} from './types'\n\nconst DEFAULT_STEP: CtaStep = {}\n\n// ─── Resolution ─────────────────────────────────────────────────────────────\n\n/** The beat's own context (input a block collected for it), `{}` until something is written. */\nexport const beatContextOf = ({ beat, stores }: Pick<CtaStateContext, 'beat' | 'stores'>) =>\n stores.insightsV2Store.beatContext[beat.guid] ?? {}\n\n/** The step named by the CTA's `action_key`, or the empty default (no key / unknown key). */\nexport const resolveStep = ({ cta }: Pick<CtaStateContext, 'cta'>): CtaStep =>\n (cta.action_key && ctaActions[cta.action_key]) || DEFAULT_STEP\n\n/** Pending always disables; the step's `disabledWhen` may add to that. */\nexport const resolveCtaState = (ctx: CtaStateContext): CtaState => {\n const step = resolveStep(ctx)\n const pending = ctx.stores.insightsV2Store.ctaStatus[ctx.beat.guid] === 'pending'\n\n return { disabled: pending || (step.disabledWhen?.(ctx) ?? false) }\n}\n\n// ─── Targets and effects ────────────────────────────────────────────────────\n\n/** Opens the beat's drawer for whichever slot triggered the current step. */\nconst openDrawerForSlot = ({\n beat,\n slot,\n stores,\n}: Pick<CtaContext, 'beat' | 'slot' | 'stores'>) => {\n stores.insightsV2Store.openCtaDrawer(\n beat.guid,\n slot === 'primary' ? 'primaryCta' : 'secondaryCta',\n )\n}\n\n/** Pre-existing BaseLayout behaviour: drawer for a real block, otherwise beat/cta message. */\nconst runDefaultTarget = (ctx: CtaContext) => {\n const { beat, cta, stores } = ctx\n\n if (hasDrawerBlock(cta.block)) {\n openDrawerForSlot(ctx)\n return\n }\n\n const { is_mobile_webview, clientConfig } = stores.appDataStore.appConfig\n\n sendBeatCta(beat, {\n isMobileWebview: is_mobile_webview,\n webviewScheme: clientConfig?.master?.ui_message_webview_url_scheme,\n userGuid: beat.insights_payload?.user_guid ?? beat.user_guid,\n })\n}\n\nconst runEffect = (effect: CtaEffect, { beat, stores }: CtaContext) => {\n switch (effect) {\n case 'refreshBeat':\n stores.emitUpdate({ staleBeatGuid: beat.guid })\n break\n }\n}\n\n/**\n * First primary click records `cta_clicked_at` through the host. Fire-and-forget: whatever the\n * host does (reject, throw, return nothing) must never fail the user's action.\n */\nconst markCtaClicked = ({ beat, slot, hostActions }: CtaContext) => {\n if (slot !== 'primary' || beat.cta_clicked_at) return\n\n // Wrapping the call in `.then` turns a synchronous throw into a rejection, and the `.catch`\n // swallows both: a failed cta_clicked_at write is not the user's action.\n Promise.resolve()\n .then(() =>\n hostActions.onCtaAction?.({ beatGuid: beat.guid, name: HOST_ACTIONS.markCtaClicked }),\n )\n .catch(() => {})\n}\n\n// ─── Shared bookkeeping ─────────────────────────────────────────────────────\n\n/** Runs a named handler, then its `onSuccess` effects. Shared by card CTAs and drawer saves. */\nconst runHandlerWithEffects = async (\n ctx: CtaContext,\n handlerName: CtaHandlerName,\n onSuccess: CtaEffect[],\n): Promise<void> => {\n // Names are typed, but the map is still indexed defensively: config can come from anywhere.\n const handler = (ctaHandlers as Record<string, CtaHandler>)[handlerName]\n\n if (!handler) throw new Error(`Unknown CTA handler \"${handlerName}\"`)\n\n await handler(ctx)\n\n for (const effect of onSuccess) runEffect(effect, ctx)\n}\n\n/** Per-beat status around `work`: `pending` -> `done` | `error` (+ captureException). */\nconst withCtaStatus = async (\n { beat, stores }: Pick<CtaContext, 'beat' | 'stores'>,\n work: () => Promise<void>,\n captureContext: Record<string, string> = {},\n): Promise<boolean> => {\n const { insightsV2Store } = stores\n\n insightsV2Store.setCtaStatus(beat.guid, 'pending')\n\n try {\n await work()\n insightsV2Store.setCtaStatus(beat.guid, 'done')\n\n return true\n } catch (error) {\n insightsV2Store.setCtaStatus(beat.guid, 'error')\n stores.captureException(error, {\n store: 'ctaActions',\n template: beat.template,\n ...captureContext,\n })\n\n return false\n }\n}\n\n// ─── Entry points ───────────────────────────────────────────────────────────\n\n/** Runs the CTA's step: `run` handler, `onSuccess` effects, then the `next` target. */\nexport const runCtaAction = async (ctx: CtaContext): Promise<void> => {\n const step = resolveStep(ctx)\n const stepParams = typeof step.params === 'function' ? step.params(ctx) : step.params\n const stepCtx: CtaContext = { ...ctx, params: { ...stepParams, ...ctx.params } }\n\n if (!step.skipCtaClicked) markCtaClicked(stepCtx)\n\n await withCtaStatus(stepCtx, async () => {\n if (step.run) await runHandlerWithEffects(stepCtx, step.run, step.onSuccess ?? [])\n\n const target = step.next ?? (step.run ? 'none' : 'default')\n\n if (target === 'default') runDefaultTarget(stepCtx)\n else if (target === 'drawer') openDrawerForSlot(stepCtx)\n })\n}\n\n/** Placeholder CTA for handlers run from inside a drawer, where no card slot is involved. */\nconst DIRECT_CTA = { label: '', block: '' }\n\n/** Runs a handler directly (drawer Save buttons): same bookkeeping as a card CTA. True on success. */\nexport const runCtaHandler = (\n ctx: CtaHandlerContext,\n handlerName: CtaHandlerName,\n { onSuccess = [] }: RunHandlerOptions = {},\n): Promise<boolean> => {\n const fullCtx: CtaContext = { ...ctx, cta: DIRECT_CTA, slot: 'primary' }\n\n return withCtaStatus(fullCtx, () => runHandlerWithEffects(fullCtx, handlerName, onSuccess), {\n handler: handlerName,\n })\n}\n"],"mappings":";;;;;AAgBA,IAAM,IAAwB,CAAC,GASlB,IAAA,CAAe,EAAE,KAAA,EAAA,MAC3B,EAAI,cAAc,EAAW,EAAI,UAAA,KAAgB,GAGvC,IAAA,CAAmB,MAAmC;AACjE,QAAM,IAAO,EAAY,CAAG;AAG5B,SAAO,EAAE,UAFO,EAAI,OAAO,gBAAgB,UAAU,EAAI,KAAK,IAAA,MAAU,cAEzC,EAAK,eAAe,CAAG,KAAK,IAAO;AACpE,GAKM,IAAA,CAAqB,EACzB,MAAA,GACA,MAAA,GACA,QAAA,EAAA,MACkD;AAClD,EAAA,EAAO,gBAAgB,cACrB,EAAK,MACL,MAAS,YAAY,eAAe,cACtC;AACF,GAGM,IAAA,CAAoB,MAAoB;AAC5C,QAAM,EAAE,MAAA,GAAM,KAAA,GAAK,QAAA,EAAA,IAAW;AAE9B,MAAI,EAAe,EAAI,KAAK,GAAG;AAC7B,IAAA,EAAkB,CAAG;AACrB;AAAA,EACF;AAEA,QAAM,EAAE,mBAAA,GAAmB,cAAA,EAAA,IAAiB,EAAO,aAAa;AAEhE,EAAA,EAAY,GAAM;AAAA,IAChB,iBAAiB;AAAA,IACjB,eAAe,GAAc,QAAQ;AAAA,IACrC,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A,IAAE,GAAG;AAAA,IAAK,QAAQ;AAAA,MAAE,GAAG;AAAA,MAAY,GAAG,EAAI;AAAA,IAAO;AAAA,EAAE;AAE/E,EAAK,EAAK,kBAAgB,EAAe,CAAO,GAEhD,MAAM,EAAc,GAAS,YAAY;AACvC,IAAI,EAAK,OAAK,MAAM,EAAsB,GAAS,EAAK,KAAK,EAAK,aAAa,CAAC,CAAC;AAEjF,UAAM,IAAS,EAAK,SAAS,EAAK,MAAM,SAAS;AAEjD,IAAI,MAAW,YAAW,EAAiB,CAAO,IACzC,MAAW,YAAU,EAAkB,CAAO;AAAA,EACzD,CAAC;AACH,GAGM,IAAa;AAAA,EAAE,OAAO;AAAA,EAAI,OAAO;AAAG,GAG7B,IAAA,CACX,GACA,GACA,EAAE,WAAA,IAAY,CAAC,EAAA,IAAyB,CAAC,MACpB;AACrB,QAAM,IAAsB;AAAA,IAAE,GAAG;AAAA,IAAK,KAAK;AAAA,IAAY,MAAM;AAAA,EAAU;AAEvE,SAAO,EAAc,GAAA,MAAe,EAAsB,GAAS,GAAa,CAAS,GAAG,EAC1F,SAAS,EACX,CAAC;AACH"}
1
+ {"version":3,"file":"runCtaAction.es.js","names":[],"sources":["../../../src/insights-v2/ctaActions/runCtaAction.ts"],"sourcesContent":["import { sendBeatCta } from '../../common/utils/PostMessage'\nimport { hasDrawerBlock } from '../mappings/blocks'\nimport { ctaActions } from './ctaConfig'\nimport { resolveCtaMetadata } from './ctaPostMessages'\nimport { ctaHandlers, type CtaHandlerName } from './ctaHandlers'\nimport { HOST_ACTIONS } from './hostActions'\nimport type { CtaPostMessageMetadata } from '../../core'\nimport type {\n CtaContext,\n CtaEffect,\n CtaHandler,\n CtaHandlerContext,\n CtaState,\n CtaStateContext,\n CtaStep,\n RunHandlerOptions,\n} from './types'\n\nconst DEFAULT_STEP: CtaStep = {}\n\n// ─── Resolution ─────────────────────────────────────────────────────────────\n\n/** The beat's own context (input a block collected for it), `{}` until something is written. */\nexport const beatContextOf = ({ beat, stores }: Pick<CtaStateContext, 'beat' | 'stores'>) =>\n stores.insightsV2Store.beatContext[beat.guid] ?? {}\n\n/** The step named by the CTA's `action_key`, or the empty default (no key / unknown key). */\nexport const resolveStep = ({ cta }: Pick<CtaStateContext, 'cta'>): CtaStep =>\n (cta.action_key && ctaActions[cta.action_key]) || DEFAULT_STEP\n\n/** Pending always disables; the step's `disabledWhen` may add to that. */\nexport const resolveCtaState = (ctx: CtaStateContext): CtaState => {\n const step = resolveStep(ctx)\n const pending = ctx.stores.insightsV2Store.ctaStatus[ctx.beat.guid] === 'pending'\n\n return { disabled: pending || (step.disabledWhen?.(ctx) ?? false) }\n}\n\n// ─── Targets and effects ────────────────────────────────────────────────────\n\n/** Opens the beat's drawer for whichever slot triggered the current step. */\nconst openDrawerForSlot = ({\n beat,\n slot,\n stores,\n}: Pick<CtaContext, 'beat' | 'slot' | 'stores'>) => {\n stores.insightsV2Store.openCtaDrawer(\n beat.guid,\n slot === 'primary' ? 'primaryCta' : 'secondaryCta',\n )\n}\n\n/**\n * Posts this CTA's resolved message (event, op and beat-specific payload, from the backend's\n * `cta.metadata` or the template's `ctaPostMessages` entry) to the host.\n */\nconst postCtaMessage = ({ beat, stores }: CtaContext, metadata: CtaPostMessageMetadata) => {\n const { is_mobile_webview, clientConfig } = stores.appDataStore.appConfig\n const { event, action, payload } = metadata\n\n sendBeatCta(beat, {\n event: event ?? undefined,\n op: action ?? undefined,\n extras: payload ?? undefined,\n isMobileWebview: is_mobile_webview,\n webviewScheme: clientConfig?.master?.ui_message_webview_url_scheme,\n userGuid: beat.insights_payload?.user_guid ?? beat.user_guid,\n })\n}\n\n/**\n * Default target: open the drawer for a real block, otherwise nothing. A post message is never\n * implied by a missing block; it is sent only when one resolves (see runCtaAction).\n */\nconst runDefaultTarget = (ctx: CtaContext) => {\n if (hasDrawerBlock(ctx.cta.block)) openDrawerForSlot(ctx)\n}\n\nconst runEffect = (effect: CtaEffect, { beat, stores }: CtaContext) => {\n switch (effect) {\n case 'refreshBeat':\n stores.emitUpdate({ staleBeatGuid: beat.guid })\n break\n }\n}\n\n/**\n * First primary click records `cta_clicked_at` through the host. Fire-and-forget: whatever the\n * host does (reject, throw, return nothing) must never fail the user's action.\n */\nconst markCtaClicked = ({ beat, slot, hostActions }: CtaContext) => {\n if (slot !== 'primary' || beat.cta_clicked_at) return\n\n // Wrapping the call in `.then` turns a synchronous throw into a rejection, and the `.catch`\n // swallows both: a failed cta_clicked_at write is not the user's action.\n Promise.resolve()\n .then(() =>\n hostActions.onCtaAction?.({ beatGuid: beat.guid, name: HOST_ACTIONS.markCtaClicked }),\n )\n .catch(() => {})\n}\n\n// ─── Shared bookkeeping ─────────────────────────────────────────────────────\n\n/** Runs a named handler, then its `onSuccess` effects. Shared by card CTAs and drawer saves. */\nconst runHandlerWithEffects = async (\n ctx: CtaContext,\n handlerName: CtaHandlerName,\n onSuccess: CtaEffect[],\n): Promise<void> => {\n // Names are typed, but the map is still indexed defensively: config can come from anywhere.\n const handler = (ctaHandlers as Record<string, CtaHandler>)[handlerName]\n\n if (!handler) throw new Error(`Unknown CTA handler \"${handlerName}\"`)\n\n await handler(ctx)\n\n for (const effect of onSuccess) runEffect(effect, ctx)\n}\n\n/** Per-beat status around `work`: `pending` -> `done` | `error` (+ captureException). */\nconst withCtaStatus = async (\n { beat, stores }: Pick<CtaContext, 'beat' | 'stores'>,\n work: () => Promise<void>,\n captureContext: Record<string, string> = {},\n): Promise<boolean> => {\n const { insightsV2Store } = stores\n\n insightsV2Store.setCtaStatus(beat.guid, 'pending')\n\n try {\n await work()\n insightsV2Store.setCtaStatus(beat.guid, 'done')\n\n return true\n } catch (error) {\n insightsV2Store.setCtaStatus(beat.guid, 'error')\n stores.captureException(error, {\n store: 'ctaActions',\n template: beat.template,\n ...captureContext,\n })\n\n return false\n }\n}\n\n// ─── Entry points ───────────────────────────────────────────────────────────\n\n/**\n * Runs the CTA's step: `run` handler, `onSuccess` effects, the CTA's post message if one resolves\n * (backend `cta.metadata` or the template's `ctaPostMessages` entry; skipped when the handler\n * throws), then the `next` target. No resolved message = no post.\n */\nexport const runCtaAction = async (ctx: CtaContext): Promise<void> => {\n const step = resolveStep(ctx)\n const stepParams = typeof step.params === 'function' ? step.params(ctx) : step.params\n const stepCtx: CtaContext = { ...ctx, params: { ...stepParams, ...ctx.params } }\n\n if (!step.skipCtaClicked) markCtaClicked(stepCtx)\n\n await withCtaStatus(stepCtx, async () => {\n if (step.run) await runHandlerWithEffects(stepCtx, step.run, step.onSuccess ?? [])\n\n const metadata = resolveCtaMetadata(stepCtx)\n\n if (metadata) postCtaMessage(stepCtx, metadata)\n\n const target = step.next ?? (step.run ? 'none' : 'default')\n\n if (target === 'default') runDefaultTarget(stepCtx)\n else if (target === 'drawer') openDrawerForSlot(stepCtx)\n })\n}\n\n/** Placeholder CTA for handlers run from inside a drawer, where no card slot is involved. */\nconst DIRECT_CTA = { label: '', block: '' }\n\n/** Runs a handler directly (drawer Save buttons): same bookkeeping as a card CTA. True on success. */\nexport const runCtaHandler = (\n ctx: CtaHandlerContext,\n handlerName: CtaHandlerName,\n { onSuccess = [] }: RunHandlerOptions = {},\n): Promise<boolean> => {\n const fullCtx: CtaContext = { ...ctx, cta: DIRECT_CTA, slot: 'primary' }\n\n return withCtaStatus(fullCtx, () => runHandlerWithEffects(fullCtx, handlerName, onSuccess), {\n handler: handlerName,\n })\n}\n"],"mappings":";;;;;;AAkBA,IAAM,IAAwB,CAAC,GASlB,IAAA,CAAe,EAAE,KAAA,EAAA,MAC3B,EAAI,cAAc,EAAW,EAAI,UAAA,KAAgB,GAGvC,IAAA,CAAmB,MAAmC;AACjE,QAAM,IAAO,EAAY,CAAG;AAG5B,SAAO,EAAE,UAFO,EAAI,OAAO,gBAAgB,UAAU,EAAI,KAAK,IAAA,MAAU,cAEzC,EAAK,eAAe,CAAG,KAAK,IAAO;AACpE,GAKM,IAAA,CAAqB,EACzB,MAAA,GACA,MAAA,GACA,QAAA,EAAA,MACkD;AAClD,EAAA,E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AG,EAC1F,SAAS,EACX,CAAC;AACH"}
@@ -35,7 +35,7 @@ export interface CtaStep {
35
35
  /** Effects executed after `run` resolves successfully. */
36
36
  onSuccess?: CtaEffect[];
37
37
  /**
38
- * After `run`: `default` = drawer if the CTA has a block, else post; `drawer` forces the
38
+ * After `run`: `default` = drawer if the CTA has a block, else nothing; `drawer` forces the
39
39
  * drawer; `none` stops. Omitted = `none` with `run`, `default` without.
40
40
  */
41
41
  next?: 'default' | 'drawer' | 'none';
@@ -1,5 +1,6 @@
1
1
  export * from './blocks';
2
2
  export { default as AccountHeroCard } from './components/AccountHeroCard';
3
+ export { default as DirectDepositCard, type DirectDepositCardStyleProps, type DirectDepositPillConfig, } from './components/DirectDepositCard';
3
4
  export { default as AmountPill } from './components/AmountPill';
4
5
  export { default as BadgedTile } from './components/BadgedTile';
5
6
  export { default as StatusBadge, type StatusTone } from './components/StatusBadge';
@@ -8,7 +8,7 @@ import d, { isLogoGuid as C } from "./components/LogoFromGuid.es.js";
8
8
  import B from "./components/StatusBadge.es.js";
9
9
  import h from "./components/CompactInsightCard.es.js";
10
10
  import S from "./components/InsightErrorCard.es.js";
11
- import { BAR_CHART_VARIANTS as T, barChartVariant as b, buildChartData as D, buildDataSeries as I } from "./blocks/ChartBlocks/BarchartBlock/utils.es.js";
11
+ import { BAR_CHART_VARIANTS as A, barChartVariant as T, buildChartData as b, buildDataSeries as I } from "./blocks/ChartBlocks/BarchartBlock/utils.es.js";
12
12
  import { BarchartBlock as H } from "./blocks/ChartBlocks/BarchartBlock/BarchartBlock.es.js";
13
13
  import { DoubleBarChartBlock as O } from "./blocks/ChartBlocks/DoubleBarChartBlock/DoubleBarChartBlock.es.js";
14
14
  import E from "./blocks/ChartBlocks/StepChartBlock/StepChartBlock.es.js";
@@ -17,90 +17,94 @@ import V from "./blocks/ChartBlocks/DoubleProgressBarBlock/DoubleProgressBarBloc
17
17
  import y from "./blocks/ComponentBlocks/AccountBlock/AccountBlock.es.js";
18
18
  import G from "./components/TransferLogoCard.es.js";
19
19
  import N from "./blocks/ComponentBlocks/AccountSwitchBlock/AccountSwitchBlock.es.js";
20
- import { BudgetBlock as U } from "./blocks/ComponentBlocks/BudgetBlock/BudgetBlock.es.js";
21
- import q from "./components/SaveAnExtraCard.es.js";
22
- import J from "./blocks/ComponentBlocks/SaveExtraBlock/SaveExtraBlock.es.js";
23
- import Q from "./components/InsightTransactionRow.es.js";
24
- import Y from "./components/TransactionListCard.es.js";
25
- import { TransactionBlock as $, TransactionBlockVariant as rr } from "./blocks/ComponentBlocks/TransactionBlock/TransactionBlock.es.js";
26
- import tr from "./components/WithdrawalCard.es.js";
27
- import ir from "./blocks/ComponentBlocks/WithdrawalBlock/WithdrawalBlock.es.js";
28
- import { SVGImageBlock as pr } from "./blocks/ImageBlocks/SVGImageBlock/SVGImageBlock.es.js";
29
- import er from "./components/AccountHeroCard.es.js";
30
- import sr from "./components/AmountPill.es.js";
31
- import lr from "./components/DesignateEmergencySavingsCard.es.js";
32
- import { ErrorCard as Cr } from "./components/ErrorCard.es.js";
33
- import { FeedbackBar as Br } from "./components/FeedbackBar.es.js";
34
- import hr from "./components/FeedbackDialog.es.js";
35
- import { DismissInsightDialog as Sr } from "./components/DismissInsightDialog.es.js";
36
- import { HiddenConfirmationCard as Tr } from "./components/HiddenConfirmationCard.es.js";
37
- import { LoadingCard as Dr } from "./components/LoadingCard.es.js";
38
- import { ObsolesceBanner as Lr } from "./components/ObsolesceBanner.es.js";
39
- import { HOST_ACTIONS as vr } from "./ctaActions/hostActions.es.js";
40
- import { useBeatCtaActions as wr, useCtaHandler as Er } from "./ctaActions/useCtaAction.es.js";
41
- import Rr from "./components/BaseLayout.es.js";
42
- import Vr from "./components/StatusMessageCard.es.js";
43
- import yr from "./components/LogoTile.es.js";
44
- import Gr from "./components/LogoClusterCard.es.js";
45
- import Nr from "./components/MerchantHighlightCard.es.js";
46
- import Ur from "./components/P2PLogoStack.es.js";
47
- import qr from "./components/SavingsOpportunityCard.es.js";
48
- import Jr from "./components/SubscriptionHeroCard.es.js";
49
- import Qr from "./components/UpcomingBillCard.es.js";
20
+ import U from "./components/AccountHeroCard.es.js";
21
+ import q from "./components/DirectDepositCard.es.js";
22
+ import J from "./blocks/ComponentBlocks/DirectDepositBlock/DirectDepositBlock.es.js";
23
+ import { BudgetBlock as Q } from "./blocks/ComponentBlocks/BudgetBlock/BudgetBlock.es.js";
24
+ import Y from "./components/SaveAnExtraCard.es.js";
25
+ import $ from "./blocks/ComponentBlocks/SaveExtraBlock/SaveExtraBlock.es.js";
26
+ import or from "./components/InsightTransactionRow.es.js";
27
+ import mr from "./components/TransactionListCard.es.js";
28
+ import { TransactionBlock as ar, TransactionBlockVariant as pr } from "./blocks/ComponentBlocks/TransactionBlock/TransactionBlock.es.js";
29
+ import er from "./components/WithdrawalCard.es.js";
30
+ import sr from "./blocks/ComponentBlocks/WithdrawalBlock/WithdrawalBlock.es.js";
31
+ import { SVGImageBlock as lr } from "./blocks/ImageBlocks/SVGImageBlock/SVGImageBlock.es.js";
32
+ import Cr from "./components/AmountPill.es.js";
33
+ import Br from "./components/DesignateEmergencySavingsCard.es.js";
34
+ import { ErrorCard as hr } from "./components/ErrorCard.es.js";
35
+ import { FeedbackBar as Sr } from "./components/FeedbackBar.es.js";
36
+ import Ar from "./components/FeedbackDialog.es.js";
37
+ import { DismissInsightDialog as br } from "./components/DismissInsightDialog.es.js";
38
+ import { HiddenConfirmationCard as Lr } from "./components/HiddenConfirmationCard.es.js";
39
+ import { LoadingCard as vr } from "./components/LoadingCard.es.js";
40
+ import { ObsolesceBanner as wr } from "./components/ObsolesceBanner.es.js";
41
+ import { HOST_ACTIONS as Pr } from "./ctaActions/hostActions.es.js";
42
+ import { useBeatCtaActions as Mr, useCtaHandler as Vr } from "./ctaActions/useCtaAction.es.js";
43
+ import yr from "./components/BaseLayout.es.js";
44
+ import Gr from "./components/StatusMessageCard.es.js";
45
+ import Nr from "./components/LogoTile.es.js";
46
+ import Ur from "./components/LogoClusterCard.es.js";
47
+ import qr from "./components/MerchantHighlightCard.es.js";
48
+ import Jr from "./components/P2PLogoStack.es.js";
49
+ import Qr from "./components/SavingsOpportunityCard.es.js";
50
+ import Yr from "./components/SubscriptionHeroCard.es.js";
51
+ import $r from "./components/UpcomingBillCard.es.js";
50
52
  export {
51
53
  y as AccountBlock,
52
- er as AccountHeroCard,
54
+ U as AccountHeroCard,
53
55
  N as AccountSwitchBlock,
54
- sr as AmountPill,
55
- T as BAR_CHART_VARIANTS,
56
+ Cr as AmountPill,
57
+ A as BAR_CHART_VARIANTS,
56
58
  f as BadgedTile,
57
59
  H as BarchartBlock,
58
- Rr as BaseLayout,
59
- U as BudgetBlock,
60
+ yr as BaseLayout,
61
+ Q as BudgetBlock,
60
62
  h as CompactInsightCard,
61
- lr as DesignateEmergencySavingsCard,
62
- Sr as DismissInsightDialog,
63
+ Br as DesignateEmergencySavingsCard,
64
+ J as DirectDepositBlock,
65
+ q as DirectDepositCard,
66
+ br as DismissInsightDialog,
63
67
  R as DonutChartBlock,
64
68
  O as DoubleBarChartBlock,
65
69
  V as DoubleProgressBarBlock,
66
- Cr as ErrorCard,
67
- Br as FeedbackBar,
68
- hr as FeedbackDialog,
69
- vr as HOST_ACTIONS,
70
- Tr as HiddenConfirmationCard,
70
+ hr as ErrorCard,
71
+ Sr as FeedbackBar,
72
+ Ar as FeedbackDialog,
73
+ Pr as HOST_ACTIONS,
74
+ Lr as HiddenConfirmationCard,
71
75
  S as InsightErrorCard,
72
76
  c as InsightOptionsMenu,
73
- Q as InsightTransactionRow,
74
- Dr as LoadingCard,
75
- Gr as LogoClusterCard,
77
+ or as InsightTransactionRow,
78
+ vr as LoadingCard,
79
+ Ur as LogoClusterCard,
76
80
  d as LogoFromGuid,
77
- yr as LogoTile,
78
- Nr as MerchantHighlightCard,
79
- Lr as ObsolesceBanner,
81
+ Nr as LogoTile,
82
+ qr as MerchantHighlightCard,
83
+ wr as ObsolesceBanner,
80
84
  n as OverflowMenu,
81
- Ur as P2PLogoStack,
82
- pr as SVGImageBlock,
83
- q as SaveAnExtraCard,
84
- J as SaveExtraBlock,
85
- qr as SavingsOpportunityCard,
85
+ Jr as P2PLogoStack,
86
+ lr as SVGImageBlock,
87
+ Y as SaveAnExtraCard,
88
+ $ as SaveExtraBlock,
89
+ Qr as SavingsOpportunityCard,
86
90
  B as StatusBadge,
87
- Vr as StatusMessageCard,
91
+ Gr as StatusMessageCard,
88
92
  o as StatusPill,
89
93
  E as StepChartBlock,
90
- Jr as SubscriptionHeroCard,
91
- $ as TransactionBlock,
92
- rr as TransactionBlockVariant,
93
- Y as TransactionListCard,
94
+ Yr as SubscriptionHeroCard,
95
+ ar as TransactionBlock,
96
+ pr as TransactionBlockVariant,
97
+ mr as TransactionListCard,
94
98
  G as TransferLogoCard,
95
- Qr as UpcomingBillCard,
96
- ir as WithdrawalBlock,
97
- tr as WithdrawalCard,
98
- b as barChartVariant,
99
- D as buildChartData,
99
+ $r as UpcomingBillCard,
100
+ sr as WithdrawalBlock,
101
+ er as WithdrawalCard,
102
+ T as barChartVariant,
103
+ b as buildChartData,
100
104
  I as buildDataSeries,
101
105
  C as isLogoGuid,
102
106
  m as resolveInsightRender,
103
107
  a as useBeatActions,
104
- wr as useBeatCtaActions,
105
- Er as useCtaHandler
108
+ Mr as useBeatCtaActions,
109
+ Vr as useCtaHandler
106
110
  };
@@ -1,52 +1,53 @@
1
- import { ContactSupportActionBlock as n } from "../actionBlocks/ContactSupportActionBlock.es.js";
1
+ import { ContactSupportActionBlock as l } from "../actionBlocks/ContactSupportActionBlock.es.js";
2
2
  import { actionBlocksKey as r } from "./actionBlocksKey.es.js";
3
- import { BarchartBlock as l } from "../blocks/ChartBlocks/BarchartBlock/BarchartBlock.es.js";
3
+ import { BarchartBlock as n } from "../blocks/ChartBlocks/BarchartBlock/BarchartBlock.es.js";
4
4
  import { DoubleBarChartBlock as m } from "../blocks/ChartBlocks/DoubleBarChartBlock/DoubleBarChartBlock.es.js";
5
5
  import _ from "../blocks/ChartBlocks/StepChartBlock/StepChartBlock.es.js";
6
6
  import p from "../blocks/ChartBlocks/DonutChartBlock/DonutChartBlock.es.js";
7
7
  import s from "../blocks/ChartBlocks/DoubleProgressBarBlock/DoubleProgressBarBlock.es.js";
8
8
  import k from "../blocks/ComponentBlocks/AccountBlock/AccountBlock.es.js";
9
9
  import C from "../blocks/ComponentBlocks/AccountSwitchBlock/AccountSwitchBlock.es.js";
10
- import { BudgetBlock as B } from "../blocks/ComponentBlocks/BudgetBlock/BudgetBlock.es.js";
11
- import T from "../blocks/ComponentBlocks/SaveExtraBlock/SaveExtraBlock.es.js";
10
+ import B from "../blocks/ComponentBlocks/DirectDepositBlock/DirectDepositBlock.es.js";
11
+ import { BudgetBlock as T } from "../blocks/ComponentBlocks/BudgetBlock/BudgetBlock.es.js";
12
+ import f from "../blocks/ComponentBlocks/SaveExtraBlock/SaveExtraBlock.es.js";
12
13
  import { TransactionBlock as u } from "../blocks/ComponentBlocks/TransactionBlock/TransactionBlock.es.js";
13
- import f from "../blocks/ComponentBlocks/WithdrawalBlock/WithdrawalBlock.es.js";
14
- import A from "../blocks/ImageBlocks/ImageBlock.es.js";
15
- import { SVGImageBlock as O } from "../blocks/ImageBlocks/SVGImageBlock/SVGImageBlock.es.js";
14
+ import A from "../blocks/ComponentBlocks/WithdrawalBlock/WithdrawalBlock.es.js";
15
+ import O from "../blocks/ImageBlocks/ImageBlock.es.js";
16
+ import { SVGImageBlock as b } from "../blocks/ImageBlocks/SVGImageBlock/SVGImageBlock.es.js";
16
17
  import { PlaceholderActionBlock as N } from "../actionBlocks/PlaceholderActionBlock.es.js";
17
- import { getMakeTransferDrawerTitle as b } from "../actionBlocks/MakeTransferActionBlock/layout.es.js";
18
- import { MakeTransferActionBlockLayer as h } from "../actionBlocks/MakeTransferActionBlock/MakeTransferActionBlockLayer.es.js";
19
- import { getDrawerHeaderTitle as I } from "../actionBlocks/TransactionHistoryBlock/utils.es.js";
18
+ import { getMakeTransferDrawerTitle as h } from "../actionBlocks/MakeTransferActionBlock/layout.es.js";
19
+ import { MakeTransferActionBlockLayer as I } from "../actionBlocks/MakeTransferActionBlock/MakeTransferActionBlockLayer.es.js";
20
+ import { getDrawerHeaderTitle as d } from "../actionBlocks/TransactionHistoryBlock/utils.es.js";
20
21
  import { TransactionDetailsBlock as g } from "../actionBlocks/TransactionDetailsBlock/TransactionDetailsBlock.es.js";
21
22
  import { useTransactionDetailsPrepare as a } from "../actionBlocks/TransactionDetailsBlock/useTransactionDetailsPrepare.es.js";
22
23
  import { TransactionHistoryBlock as L } from "../actionBlocks/TransactionHistoryBlock/TransactionHistoryBlock.es.js";
23
24
  import { useRecurringTransactionPrepare as i } from "../actionBlocks/RecurringTransactionBlock/useRecurringTransactionPrepare.es.js";
24
25
  import { RecurringTransactionBlock as S } from "../actionBlocks/RecurringTransactionBlock/RecurringTransactionBlock.es.js";
25
- import { TransactionListBlock as d } from "../actionBlocks/TransactionListBlock/TransactionListBlock.es.js";
26
- import { RemainingCashBlock as R } from "../actionBlocks/RemainingCashBlock/RemainingCashBlock.es.js";
26
+ import { TransactionListBlock as R } from "../actionBlocks/TransactionListBlock/TransactionListBlock.es.js";
27
+ import { RemainingCashBlock as P } from "../actionBlocks/RemainingCashBlock/RemainingCashBlock.es.js";
27
28
  var e = (t) => {
28
- }, P = /* @__PURE__ */ new Set([
29
+ }, D = /* @__PURE__ */ new Set([
29
30
  "",
30
31
  "null",
31
32
  "undefined"
32
- ]), eo = (t) => {
33
+ ]), io = (t) => {
33
34
  const o = t?.trim().toLowerCase();
34
- return !!o && !P.has(o);
35
- }, ao = {
35
+ return !!o && !D.has(o);
36
+ }, co = {
36
37
  [r.PLACEHOLDER_ACTION_BLOCK]: {
37
38
  Component: N,
38
39
  usePrepare: e,
39
40
  title: () => "Action Block Layer Drilldown"
40
41
  },
41
42
  [r.MAKE_TRANSFER_ACTION_BLOCK]: {
42
- Component: h,
43
+ Component: I,
43
44
  usePrepare: e,
44
- title: b
45
+ title: h
45
46
  },
46
47
  [r.TRANSCATION_HISTORY_ACTION_BLOCK]: {
47
48
  Component: L,
48
49
  usePrepare: e,
49
- title: I
50
+ title: d
50
51
  },
51
52
  [r.TRANSACTION_DETAILS_ACTION_BLOCK]: {
52
53
  Component: g,
@@ -59,39 +60,40 @@ var e = (t) => {
59
60
  title: (t, o) => o.recurring?.expense_details ?? ""
60
61
  },
61
62
  [r.REMAINING_CASH_ACTION_BLOCK]: {
62
- Component: R,
63
+ Component: P,
63
64
  usePrepare: i,
64
65
  title: (t, o) => o.insights_feed?.remaining_cash?.title ?? ""
65
66
  },
66
67
  [r.CONTACT_SUPPORT_ACTION_BLOCK]: {
67
- Component: n,
68
+ Component: l,
68
69
  usePrepare: e,
69
70
  title: (t, o) => o.help?.request_support ?? ""
70
71
  },
71
72
  [r.TRANSACTION_LIST_ACTION_BLOCK]: {
72
- Component: d,
73
+ Component: R,
73
74
  usePrepare: a,
74
75
  title: (t, o, c) => c?.insights_payload?.title ?? ""
75
76
  }
76
- }, io = {
77
+ }, lo = {
77
78
  account_block: k,
78
79
  account_switch_block: C,
79
- bar_chart_block: l,
80
- budget_block: B,
80
+ direct_deposit_block: B,
81
+ bar_chart_block: n,
82
+ budget_block: T,
81
83
  donut_chart_block: p,
82
84
  double_bar_chart_block: m,
83
85
  double_progress_bar_block: s,
84
- image_block: A,
85
- save_extra_block: T,
86
+ image_block: O,
87
+ save_extra_block: f,
86
88
  step_chart_block: _,
87
- svg_image_block: O,
88
- withdrawal_block: f,
89
+ svg_image_block: b,
90
+ withdrawal_block: A,
89
91
  transaction_block: u
90
92
  };
91
93
  export {
92
- ao as actionBlocks,
93
- io as blocks,
94
- eo as hasDrawerBlock
94
+ co as actionBlocks,
95
+ lo as blocks,
96
+ io as hasDrawerBlock
95
97
  };
96
98
 
97
99
  //# sourceMappingURL=blocks.es.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"blocks.es.js","names":[],"sources":["../../../src/insights-v2/mappings/blocks.ts"],"sourcesContent":["import {\n AccountBlock,\n AccountSwitchBlock,\n BarchartBlock,\n BudgetBlock,\n DonutChartBlock,\n DoubleBarChartBlock,\n DoubleProgressBarBlock,\n SaveExtraBlock,\n SVGImageBlock,\n WithdrawalBlock,\n TransactionBlock,\n} from '../blocks'\nimport StepChartBlock from '../blocks/ChartBlocks/StepChartBlock'\nimport ImageBlock from '../blocks/ImageBlocks/ImageBlock'\n\nimport type { Beat, GlobalCopy, InsightsPayload } from '../../core'\nimport { ContactSupportActionBlock } from '../actionBlocks/ContactSupportActionBlock'\nimport { PlaceholderActionBlock } from '../actionBlocks/PlaceholderActionBlock'\nimport { MakeTransferActionBlockLayer } from '../actionBlocks/MakeTransferActionBlock/MakeTransferActionBlockLayer'\nimport { getMakeTransferDrawerTitle } from '../actionBlocks/MakeTransferActionBlock/layout'\nimport { TransactionHistoryBlock } from '../actionBlocks/TransactionHistoryBlock/TransactionHistoryBlock'\nimport { getDrawerHeaderTitle } from '../actionBlocks/TransactionHistoryBlock/utils'\nimport {\n TransactionDetailsBlock,\n useTransactionDetailsPrepare,\n} from '../actionBlocks/TransactionDetailsBlock'\nimport {\n RecurringTransactionBlock,\n useRecurringTransactionPrepare,\n} from '../actionBlocks/RecurringTransactionBlock'\nimport { TransactionListBlock } from '../actionBlocks/TransactionListBlock'\nimport { RemainingCashBlock } from '../actionBlocks/RemainingCashBlock'\n// Keys live in ./actionBlocksKey (imported directly by chart blocks/tests too) to avoid a\n// circular import between this module and the chart blocks — see that file for details.\nimport { actionBlocksKey } from './actionBlocksKey'\n\n// Drilldown indexes are not passed down: action blocks read them from\n// InsightsV2Store (useInsightsV2Store().actionDrawer).\nexport interface ActionBlockProps {\n beat: Beat\n}\n\nconst noop = (_: ActionBlockProps) => {}\n\n// A CTA opens a drawer only when it carries a real `block`. The backend may send\n// an empty/absent block (or the literal strings \"null\"/\"undefined\") for CTAs\n// that trigger something else (e.g. a postMessage) instead of a drilldown.\nconst NON_BLOCK_VALUES = new Set(['', 'null', 'undefined'])\nexport const hasDrawerBlock = (block?: string | null): boolean => {\n const normalized = block?.trim().toLowerCase()\n return !!normalized && !NON_BLOCK_VALUES.has(normalized)\n}\n\nexport interface ActionBlockEntry {\n Component: React.ComponentType<ActionBlockProps>\n usePrepare: (props: ActionBlockProps) => void // required; default to noop in each entry\n // Resolves the drawer title from the clicked CTA's variant + copy, with the beat available\n // for blocks that title from beat fields (e.g. transaction-list reads insights_payload.title).\n // Falls back to the CTA label when the resolver returns an empty string / is absent.\n title?: (variant: string | null | undefined, copy: GlobalCopy, beat?: Beat) => string\n}\n\n// Registry of drawer drilldowns, keyed by the `block` name the backend sends\n// on a beat's CTA. To add one: create a component taking ActionBlockProps,\n// read the clicked indexes from useInsightsV2Store().actionDrawer, and\n// register it here. Add\n// `usePrepare` when the block needs to load data before rendering.\n\nexport const actionBlocks = {\n [actionBlocksKey.PLACEHOLDER_ACTION_BLOCK]: {\n Component: PlaceholderActionBlock,\n usePrepare: noop,\n title: () => 'Action Block Layer Drilldown',\n },\n [actionBlocksKey.MAKE_TRANSFER_ACTION_BLOCK]: {\n Component: MakeTransferActionBlockLayer,\n usePrepare: noop,\n title: getMakeTransferDrawerTitle,\n },\n [actionBlocksKey.TRANSCATION_HISTORY_ACTION_BLOCK]: {\n Component: TransactionHistoryBlock,\n usePrepare: noop,\n title: getDrawerHeaderTitle,\n },\n [actionBlocksKey.TRANSACTION_DETAILS_ACTION_BLOCK]: {\n Component: TransactionDetailsBlock,\n usePrepare: useTransactionDetailsPrepare,\n title: () => 'Transaction Details',\n },\n // Expense Details for one recurring subscription. Which subscription a beat names is resolved in\n // `RecurringTransactionBlock/subscriptionBeats.ts`, not through this registry.\n [actionBlocksKey.RECURRING_TRANSACTION_ACTION_BLOCK]: {\n Component: RecurringTransactionBlock,\n usePrepare: useRecurringTransactionPrepare,\n title: (_variant, copy) => copy.recurring?.expense_details ?? '',\n },\n // Remaining Cash for the Payday Cash Left Over Status beat. Store-driven: reuses the recurring\n // loader, which also loads accounts and categories, so CashflowStore's computeds are ready.\n [actionBlocksKey.REMAINING_CASH_ACTION_BLOCK]: {\n Component: RemainingCashBlock,\n usePrepare: useRecurringTransactionPrepare,\n title: (_variant, copy) => copy.insights_feed?.remaining_cash?.title ?? '',\n },\n // The block renders its own drawer (the help module's RequestSupport) on top of the action\n // drawer, so the action drawer's title is the CTA label.\n [actionBlocksKey.CONTACT_SUPPORT_ACTION_BLOCK]: {\n Component: ContactSupportActionBlock,\n usePrepare: noop,\n title: (_variant, copy) => copy.help?.request_support ?? '',\n },\n [actionBlocksKey.TRANSACTION_LIST_ACTION_BLOCK]: {\n Component: TransactionListBlock,\n usePrepare: useTransactionDetailsPrepare,\n title: (_variant, _copy, beat) => beat?.insights_payload?.title ?? '',\n },\n} as Record<string, ActionBlockEntry>\n\nexport const blocks = {\n account_block: AccountBlock,\n account_switch_block: AccountSwitchBlock,\n bar_chart_block: BarchartBlock,\n budget_block: BudgetBlock,\n donut_chart_block: DonutChartBlock,\n double_bar_chart_block: DoubleBarChartBlock,\n double_progress_bar_block: DoubleProgressBarBlock,\n image_block: ImageBlock,\n save_extra_block: SaveExtraBlock,\n step_chart_block: StepChartBlock,\n svg_image_block: SVGImageBlock,\n withdrawal_block: WithdrawalBlock,\n transaction_block: TransactionBlock,\n} as Record<string, React.ComponentType<{ payload: InsightsPayload; beatGuid?: string }>>\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;AA2CA,IAAM,IAAA,CAAQ,MAAwB;AAAC,GAKjC,IAAmB,oBAAI,IAAI;AAAA,EAAC;AAAA,EAAI;AAAA,EAAQ;AAAW,CAAC,GAC7C,KAAA,CAAkB,MAAmC;AAChE,QAAM,IAAa,GAAO,KAAK,EAAE,YAAY;AAC7C,SAAO,CAAC,CAAC,KAAc,CAAC,EAAiB,IAAI,CAAU;AACzD,GAiBa,KAAe;AAAA,EACzB,CAAA,EAAgB,wBAAA,GAA2B;AAAA,IAC1C,WAAW;AAAA,IACX,YAAY;AAAA,IACZ,OAAA,MAA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[],"sources":["../../../src/insights-v2/mappings/blocks.ts"],"sourcesContent":["import {\n AccountBlock,\n AccountSwitchBlock,\n DirectDepositBlock,\n BarchartBlock,\n BudgetBlock,\n DonutChartBlock,\n DoubleBarChartBlock,\n DoubleProgressBarBlock,\n SaveExtraBlock,\n SVGImageBlock,\n WithdrawalBlock,\n TransactionBlock,\n} from '../blocks'\nimport StepChartBlock from '../blocks/ChartBlocks/StepChartBlock'\nimport ImageBlock from '../blocks/ImageBlocks/ImageBlock'\n\nimport type { Beat, GlobalCopy, InsightsPayload } from '../../core'\nimport { ContactSupportActionBlock } from '../actionBlocks/ContactSupportActionBlock'\nimport { PlaceholderActionBlock } from '../actionBlocks/PlaceholderActionBlock'\nimport { MakeTransferActionBlockLayer } from '../actionBlocks/MakeTransferActionBlock/MakeTransferActionBlockLayer'\nimport { getMakeTransferDrawerTitle } from '../actionBlocks/MakeTransferActionBlock/layout'\nimport { TransactionHistoryBlock } from '../actionBlocks/TransactionHistoryBlock/TransactionHistoryBlock'\nimport { getDrawerHeaderTitle } from '../actionBlocks/TransactionHistoryBlock/utils'\nimport {\n TransactionDetailsBlock,\n useTransactionDetailsPrepare,\n} from '../actionBlocks/TransactionDetailsBlock'\nimport {\n RecurringTransactionBlock,\n useRecurringTransactionPrepare,\n} from '../actionBlocks/RecurringTransactionBlock'\nimport { TransactionListBlock } from '../actionBlocks/TransactionListBlock'\nimport { RemainingCashBlock } from '../actionBlocks/RemainingCashBlock'\n// Keys live in ./actionBlocksKey (imported directly by chart blocks/tests too) to avoid a\n// circular import between this module and the chart blocks — see that file for details.\nimport { actionBlocksKey } from './actionBlocksKey'\n\n// Drilldown indexes are not passed down: action blocks read them from\n// InsightsV2Store (useInsightsV2Store().actionDrawer).\nexport interface ActionBlockProps {\n beat: Beat\n}\n\nconst noop = (_: ActionBlockProps) => {}\n\n// A CTA opens a drawer only when it carries a real `block`. The backend may send\n// an empty/absent block (or the literal strings \"null\"/\"undefined\") for CTAs\n// that trigger something else (e.g. a postMessage) instead of a drilldown.\nconst NON_BLOCK_VALUES = new Set(['', 'null', 'undefined'])\nexport const hasDrawerBlock = (block?: string | null): boolean => {\n const normalized = block?.trim().toLowerCase()\n return !!normalized && !NON_BLOCK_VALUES.has(normalized)\n}\n\nexport interface ActionBlockEntry {\n Component: React.ComponentType<ActionBlockProps>\n usePrepare: (props: ActionBlockProps) => void // required; default to noop in each entry\n // Resolves the drawer title from the clicked CTA's variant + copy, with the beat available\n // for blocks that title from beat fields (e.g. transaction-list reads insights_payload.title).\n // Falls back to the CTA label when the resolver returns an empty string / is absent.\n title?: (variant: string | null | undefined, copy: GlobalCopy, beat?: Beat) => string\n}\n\n// Registry of drawer drilldowns, keyed by the `block` name the backend sends\n// on a beat's CTA. To add one: create a component taking ActionBlockProps,\n// read the clicked indexes from useInsightsV2Store().actionDrawer, and\n// register it here. Add\n// `usePrepare` when the block needs to load data before rendering.\n\nexport const actionBlocks = {\n [actionBlocksKey.PLACEHOLDER_ACTION_BLOCK]: {\n Component: PlaceholderActionBlock,\n usePrepare: noop,\n title: () => 'Action Block Layer Drilldown',\n },\n [actionBlocksKey.MAKE_TRANSFER_ACTION_BLOCK]: {\n Component: MakeTransferActionBlockLayer,\n usePrepare: noop,\n title: getMakeTransferDrawerTitle,\n },\n [actionBlocksKey.TRANSCATION_HISTORY_ACTION_BLOCK]: {\n Component: TransactionHistoryBlock,\n usePrepare: noop,\n title: getDrawerHeaderTitle,\n },\n [actionBlocksKey.TRANSACTION_DETAILS_ACTION_BLOCK]: {\n Component: TransactionDetailsBlock,\n usePrepare: useTransactionDetailsPrepare,\n title: () => 'Transaction Details',\n },\n // Expense Details for one recurring subscription. Which subscription a beat names is resolved in\n // `RecurringTransactionBlock/subscriptionBeats.ts`, not through this registry.\n [actionBlocksKey.RECURRING_TRANSACTION_ACTION_BLOCK]: {\n Component: RecurringTransactionBlock,\n usePrepare: useRecurringTransactionPrepare,\n title: (_variant, copy) => copy.recurring?.expense_details ?? '',\n },\n // Remaining Cash for the Payday Cash Left Over Status beat. Store-driven: reuses the recurring\n // loader, which also loads accounts and categories, so CashflowStore's computeds are ready.\n [actionBlocksKey.REMAINING_CASH_ACTION_BLOCK]: {\n Component: RemainingCashBlock,\n usePrepare: useRecurringTransactionPrepare,\n title: (_variant, copy) => copy.insights_feed?.remaining_cash?.title ?? '',\n },\n // The block renders its own drawer (the help module's RequestSupport) on top of the action\n // drawer, so the action drawer's title is the CTA label.\n [actionBlocksKey.CONTACT_SUPPORT_ACTION_BLOCK]: {\n Component: ContactSupportActionBlock,\n usePrepare: noop,\n title: (_variant, copy) => copy.help?.request_support ?? '',\n },\n [actionBlocksKey.TRANSACTION_LIST_ACTION_BLOCK]: {\n Component: TransactionListBlock,\n usePrepare: useTransactionDetailsPrepare,\n title: (_variant, _copy, beat) => beat?.insights_payload?.title ?? '',\n },\n} as Record<string, ActionBlockEntry>\n\nexport const blocks = {\n account_block: AccountBlock,\n account_switch_block: AccountSwitchBlock,\n direct_deposit_block: DirectDepositBlock,\n bar_chart_block: BarchartBlock,\n budget_block: BudgetBlock,\n donut_chart_block: DonutChartBlock,\n double_bar_chart_block: DoubleBarChartBlock,\n double_progress_bar_block: DoubleProgressBarBlock,\n image_block: ImageBlock,\n save_extra_block: SaveExtraBlock,\n step_chart_block: StepChartBlock,\n svg_image_block: SVGImageBlock,\n withdrawal_block: WithdrawalBlock,\n transaction_block: TransactionBlock,\n} as Record<string, React.ComponentType<{ payload: InsightsPayload; beatGuid?: string }>>\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;AA4CA,IAAM,IAAA,CAAQ,MAAwB;AAAC,GAKjC,IAAmB,oBAAI,IAAI;AAAA,EAAC;AAAA,EAAI;AAAA,EAAQ;AAAW,CAAC,GAC7C,KAAA,CAAkB,MAAmC;AAChE,QAAM,IAAa,GAAO,KAAK,EAAE,YAAY;AAC7C,SAAO,CAAC,CAAC,KAAc,CAAC,EAAiB,IAAI,CAAU;AACzD,GAiBa,KAAe;AAAA,EAC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B,kBAAkB;AAAA,EAClB,iBAAiB;AAAA,EACjB,kBAAkB;AAAA,EAClB,mBAAmB;AACrB"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mx-cartographer/experiences",
3
- "version": "9.4.69",
3
+ "version": "9.4.71",
4
4
  "description": "Library containing experience widgets",
5
5
  "author": "MX",
6
6
  "license": "MIT",