@mx-cartographer/experiences 9.6.1 → 9.6.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +11 -0
- package/dist/core/types/Insights.d.ts +20 -0
- package/dist/core/types/Insights.es.js.map +1 -1
- package/dist/core/types/InsightsInstanceSlotData.d.ts +0 -1
- package/dist/core/types/InsightsInstanceSlotData.es.js.map +1 -1
- package/dist/insights-v2/blocks/ComponentBlocks/AccountSwitchBlock/AccountSwitchBlock.d.ts +2 -4
- package/dist/insights-v2/blocks/ComponentBlocks/AccountSwitchBlock/AccountSwitchBlock.es.js +24 -33
- package/dist/insights-v2/blocks/ComponentBlocks/AccountSwitchBlock/AccountSwitchBlock.es.js.map +1 -1
- package/dist/insights-v2/blocks/ComponentBlocks/AccountSwitchBlock/layout.d.ts +36 -0
- package/dist/insights-v2/blocks/ComponentBlocks/AccountSwitchBlock/layout.es.js +40 -0
- package/dist/insights-v2/blocks/ComponentBlocks/AccountSwitchBlock/layout.es.js.map +1 -0
- package/dist/insights-v2/blocks/ComponentBlocks/SavingsOpportunityBlock/SavingsOpportunityBlock.d.ts +18 -0
- package/dist/insights-v2/blocks/ComponentBlocks/SavingsOpportunityBlock/SavingsOpportunityBlock.es.js +33 -0
- package/dist/insights-v2/blocks/ComponentBlocks/SavingsOpportunityBlock/SavingsOpportunityBlock.es.js.map +1 -0
- package/dist/insights-v2/blocks/ComponentBlocks/SavingsOpportunityBlock/index.d.ts +1 -0
- package/dist/insights-v2/blocks/ComponentBlocks/SavingsOpportunityBlock/layout.d.ts +18 -0
- package/dist/insights-v2/blocks/ComponentBlocks/SavingsOpportunityBlock/layout.es.js +13 -0
- package/dist/insights-v2/blocks/ComponentBlocks/SavingsOpportunityBlock/layout.es.js.map +1 -0
- package/dist/insights-v2/blocks/ComponentBlocks/TransactionBlock/TransactionBlock.d.ts +8 -18
- package/dist/insights-v2/blocks/ComponentBlocks/TransactionBlock/TransactionBlock.es.js +43 -42
- package/dist/insights-v2/blocks/ComponentBlocks/TransactionBlock/TransactionBlock.es.js.map +1 -1
- package/dist/insights-v2/blocks/ComponentBlocks/TransactionBlock/index.d.ts +2 -1
- package/dist/insights-v2/blocks/ComponentBlocks/TransactionBlock/layout.d.ts +30 -0
- package/dist/insights-v2/blocks/ComponentBlocks/TransactionBlock/layout.es.js +29 -0
- package/dist/insights-v2/blocks/ComponentBlocks/TransactionBlock/layout.es.js.map +1 -0
- package/dist/insights-v2/blocks/ComponentBlocks/UpcomingBillBlock/UpcomingBillBlock.d.ts +53 -0
- package/dist/insights-v2/blocks/ComponentBlocks/UpcomingBillBlock/UpcomingBillBlock.es.js +79 -0
- package/dist/insights-v2/blocks/ComponentBlocks/UpcomingBillBlock/UpcomingBillBlock.es.js.map +1 -0
- package/dist/insights-v2/blocks/ComponentBlocks/UpcomingBillBlock/index.d.ts +1 -0
- package/dist/insights-v2/blocks/ComponentBlocks/UpcomingBillBlock/layout.d.ts +13 -0
- package/dist/insights-v2/blocks/ComponentBlocks/UpcomingBillBlock/layout.es.js +6 -0
- package/dist/insights-v2/blocks/ComponentBlocks/UpcomingBillBlock/layout.es.js.map +1 -0
- package/dist/insights-v2/blocks/ComponentBlocks/UpcomingSubscriptionBlock/UpcomingSubscriptionBlock.d.ts +23 -0
- package/dist/insights-v2/blocks/ComponentBlocks/UpcomingSubscriptionBlock/UpcomingSubscriptionBlock.es.js +143 -0
- package/dist/insights-v2/blocks/ComponentBlocks/UpcomingSubscriptionBlock/UpcomingSubscriptionBlock.es.js.map +1 -0
- package/dist/insights-v2/blocks/ComponentBlocks/UpcomingSubscriptionBlock/index.d.ts +1 -0
- package/dist/insights-v2/blocks/ComponentBlocks/UpcomingSubscriptionBlock/layout.d.ts +13 -0
- package/dist/insights-v2/blocks/ComponentBlocks/UpcomingSubscriptionBlock/layout.es.js +6 -0
- package/dist/insights-v2/blocks/ComponentBlocks/UpcomingSubscriptionBlock/layout.es.js.map +1 -0
- package/dist/insights-v2/blocks/ComponentBlocks/index.d.ts +3 -0
- package/dist/insights-v2/blocks/resolveVariantConfig.d.ts +10 -0
- package/dist/insights-v2/blocks/resolveVariantConfig.es.js +6 -0
- package/dist/insights-v2/blocks/resolveVariantConfig.es.js.map +1 -0
- package/dist/insights-v2/components/celebrationGradients.d.ts +19 -7
- package/dist/insights-v2/components/celebrationGradients.es.js +7 -4
- package/dist/insights-v2/components/celebrationGradients.es.js.map +1 -1
- package/dist/insights-v2/index.es.js +92 -85
- package/dist/insights-v2/mappings/blocks.es.js +56 -50
- package/dist/insights-v2/mappings/blocks.es.js.map +1 -1
- package/package.json +1 -1
|
@@ -3,5 +3,8 @@ export * from './AccountSwitchBlock';
|
|
|
3
3
|
export * from './DirectDepositBlock';
|
|
4
4
|
export * from './BudgetBlock';
|
|
5
5
|
export * from './SaveExtraBlock';
|
|
6
|
+
export * from './SavingsOpportunityBlock';
|
|
6
7
|
export * from './TransactionBlock';
|
|
8
|
+
export * from './UpcomingBillBlock';
|
|
9
|
+
export * from './UpcomingSubscriptionBlock';
|
|
7
10
|
export * from './WithdrawalBlock';
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Picks a block's per-variant config from its `layout.ts` table by the backend
|
|
3
|
+
* `instance_slot.variant`, falling back to `fallback` for anything the table does not own.
|
|
4
|
+
*
|
|
5
|
+
* `Object.hasOwn` rather than a bare index: the key is backend-controlled, and an inherited
|
|
6
|
+
* name like `constructor` would otherwise return a truthy non-config that `??` lets through.
|
|
7
|
+
* Unknown variants warn, like `createVariantBlock`, so a backend typo or a new server variant
|
|
8
|
+
* is visible instead of silently degrading.
|
|
9
|
+
*/
|
|
10
|
+
export declare const resolveVariantConfig: <K extends string, C>(table: Record<K, C>, variant: string | null | undefined, fallback: K, blockName: string) => C;
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
var u = (o, n, r, e) => n != null && Object.hasOwn(o, n) ? o[n] : (n != null && console.warn(`[${e}] Unknown variant "${n}" — rendering "${r}". Add it to layout.ts.`), o[r]);
|
|
2
|
+
export {
|
|
3
|
+
u as resolveVariantConfig
|
|
4
|
+
};
|
|
5
|
+
|
|
6
|
+
//# sourceMappingURL=resolveVariantConfig.es.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"resolveVariantConfig.es.js","names":[],"sources":["../../../src/insights-v2/blocks/resolveVariantConfig.ts"],"sourcesContent":["/**\n * Picks a block's per-variant config from its `layout.ts` table by the backend\n * `instance_slot.variant`, falling back to `fallback` for anything the table does not own.\n *\n * `Object.hasOwn` rather than a bare index: the key is backend-controlled, and an inherited\n * name like `constructor` would otherwise return a truthy non-config that `??` lets through.\n * Unknown variants warn, like `createVariantBlock`, so a backend typo or a new server variant\n * is visible instead of silently degrading.\n */\nexport const resolveVariantConfig = <K extends string, C>(\n table: Record<K, C>,\n variant: string | null | undefined,\n fallback: K,\n blockName: string,\n): C => {\n if (variant != null && Object.hasOwn(table, variant)) return table[variant as K]\n\n if (variant != null) {\n console.warn(\n `[${blockName}] Unknown variant \"${variant}\" — rendering \"${fallback}\". Add it to layout.ts.`,\n )\n }\n\n return table[fallback]\n}\n"],"mappings":"AASA,IAAa,IAAA,CACX,GACA,GACA,GACA,MAEI,KAAW,QAAQ,OAAO,OAAO,GAAO,CAAO,IAAU,EAAM,CAAA,KAE/D,KAAW,QACb,QAAQ,KACN,IAAI,CAAA,sBAA+B,CAAA,kBAAyB,CAAA,yBAC9D,GAGK,EAAM,CAAA"}
|
|
@@ -1,12 +1,13 @@
|
|
|
1
|
+
import { Theme } from '@mui/material/styles';
|
|
1
2
|
/**
|
|
2
|
-
* Decorative
|
|
3
|
-
*
|
|
4
|
-
*
|
|
3
|
+
* Decorative slot washes shared by the block layouts and the presentational components, so
|
|
4
|
+
* one source holds each gradient. The 20%–25% washes layer over `background.paper` via
|
|
5
|
+
* `backgroundImage`; `DISCOVERED_ACCOUNTS_GRADIENT` is opaque and stands alone.
|
|
5
6
|
*
|
|
6
|
-
* - WARM_LIME_ACCENT_GRADIENT:
|
|
7
|
-
*
|
|
8
|
-
* -
|
|
9
|
-
* -
|
|
7
|
+
* - WARM_LIME_ACCENT_GRADIENT: merchant categorization and deposit celebration states.
|
|
8
|
+
* - CELEBRATION_GRADIENT / ACCOUNT_CONNECTED_GRADIENT: balance milestones, account connected.
|
|
9
|
+
* - WARNING_WASH_GRADIENT: a flagged charge (Unexpected Subscription Payment).
|
|
10
|
+
* - getPrimaryWashGradient(theme): pending connect / detected subscription, from the palette.
|
|
10
11
|
*/
|
|
11
12
|
/**
|
|
12
13
|
* Warm → lime accent wash at 20% opacity. Used as a tinted background behind
|
|
@@ -23,3 +24,14 @@ export declare const DISCOVERED_ACCOUNTS_GRADIENT = "linear-gradient(200.73deg,
|
|
|
23
24
|
* `background` shorthand — a 20% gradient over transparency renders wrong.
|
|
24
25
|
*/
|
|
25
26
|
export declare const ACCOUNT_CONNECTED_GRADIENT = "linear-gradient(257deg, rgba(255, 224, 153, 0.2) 1.86%, rgba(255, 129, 230, 0.2) 101.54%)";
|
|
27
|
+
/**
|
|
28
|
+
* Orange → red-orange wash at 25% opacity behind a flagged charge (Unexpected Subscription
|
|
29
|
+
* Payment). Figma "Warning Gradient 1": a bespoke two-stop blend with no palette token, so it
|
|
30
|
+
* stays a literal like the other washes here rather than being derived from `palette.warning`.
|
|
31
|
+
*/
|
|
32
|
+
export declare const WARNING_WASH_GRADIENT = "linear-gradient(201deg, rgba(255, 170, 0, 0.25) 1.86%, rgba(255, 68, 0, 0.25) 101.54%)";
|
|
33
|
+
/**
|
|
34
|
+
* Blue slot wash behind a pending connect / detected-subscription row: `primary.light` →
|
|
35
|
+
* `primary.main` at 75% over paper, built from the live palette so it follows the theme.
|
|
36
|
+
*/
|
|
37
|
+
export declare const getPrimaryWashGradient: ({ palette }: Theme) => string;
|
|
@@ -1,8 +1,11 @@
|
|
|
1
|
-
|
|
1
|
+
import { alpha as a } from "@mui/material/styles";
|
|
2
|
+
var i = "linear-gradient(200.73deg, rgba(255, 223, 152, 0.2) 1.86%, rgba(173, 248, 43, 0.2) 101.54%)", e = "linear-gradient(200.73deg, rgba(255, 223, 152, 0.2) 1.86%, rgba(255, 128, 229, 0.2) 101.54%)", n = "linear-gradient(257deg, rgba(255, 224, 153, 0.2) 1.86%, rgba(255, 129, 230, 0.2) 101.54%)", d = "linear-gradient(201deg, rgba(255, 170, 0, 0.25) 1.86%, rgba(255, 68, 0, 0.25) 101.54%)", N = ({ palette: r }) => `linear-gradient(173deg, ${a(r.primary.light, 0.75)} 46.41%, ${a(r.primary.main, 0.75)} 78.14%)`;
|
|
2
3
|
export {
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
4
|
+
n as ACCOUNT_CONNECTED_GRADIENT,
|
|
5
|
+
e as CELEBRATION_GRADIENT,
|
|
6
|
+
i as WARM_LIME_ACCENT_GRADIENT,
|
|
7
|
+
d as WARNING_WASH_GRADIENT,
|
|
8
|
+
N as getPrimaryWashGradient
|
|
6
9
|
};
|
|
7
10
|
|
|
8
11
|
//# sourceMappingURL=celebrationGradients.es.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"celebrationGradients.es.js","names":[],"sources":["../../../src/insights-v2/components/celebrationGradients.ts"],"sourcesContent":["
|
|
1
|
+
{"version":3,"file":"celebrationGradients.es.js","names":[],"sources":["../../../src/insights-v2/components/celebrationGradients.ts"],"sourcesContent":["import { alpha, type Theme } from '@mui/material/styles'\n\n/**\n * Decorative slot washes shared by the block layouts and the presentational components, so\n * one source holds each gradient. The 20%–25% washes layer over `background.paper` via\n * `backgroundImage`; `DISCOVERED_ACCOUNTS_GRADIENT` is opaque and stands alone.\n *\n * - WARM_LIME_ACCENT_GRADIENT: merchant categorization and deposit celebration states.\n * - CELEBRATION_GRADIENT / ACCOUNT_CONNECTED_GRADIENT: balance milestones, account connected.\n * - WARNING_WASH_GRADIENT: a flagged charge (Unexpected Subscription Payment).\n * - getPrimaryWashGradient(theme): pending connect / detected subscription, from the palette.\n */\n\n/**\n * Warm → lime accent wash at 20% opacity. Used as a tinted background behind\n * merchant categorization highlights and deposit celebration callouts.\n */\nexport const WARM_LIME_ACCENT_GRADIENT =\n 'linear-gradient(200.73deg, rgba(255, 223, 152, 0.2) 1.86%, rgba(173, 248, 43, 0.2) 101.54%)'\n\n/** Warm → pink wash behind balance/savings milestones. */\nexport const CELEBRATION_GRADIENT =\n 'linear-gradient(200.73deg, rgba(255, 223, 152, 0.2) 1.86%, rgba(255, 128, 229, 0.2) 101.54%)'\n\n/** Peach → pink gradient for Discovered Accounts success state. */\nexport const DISCOVERED_ACCOUNTS_GRADIENT =\n 'linear-gradient(200.73deg, rgba(255, 224, 153, 1) 1.86%, rgba(255, 129, 230, 1) 101.54%)'\n\n/**\n * Warm → pink wash at 20% opacity for the account-connected success state.\n * Layer over `background.paper` (the Figma spec's `#FFF` base), not the\n * `background` shorthand — a 20% gradient over transparency renders wrong.\n */\nexport const ACCOUNT_CONNECTED_GRADIENT =\n 'linear-gradient(257deg, rgba(255, 224, 153, 0.2) 1.86%, rgba(255, 129, 230, 0.2) 101.54%)'\n\n/**\n * Orange → red-orange wash at 25% opacity behind a flagged charge (Unexpected Subscription\n * Payment). Figma \"Warning Gradient 1\": a bespoke two-stop blend with no palette token, so it\n * stays a literal like the other washes here rather than being derived from `palette.warning`.\n */\nexport const WARNING_WASH_GRADIENT =\n 'linear-gradient(201deg, rgba(255, 170, 0, 0.25) 1.86%, rgba(255, 68, 0, 0.25) 101.54%)'\n\n/**\n * Blue slot wash behind a pending connect / detected-subscription row: `primary.light` →\n * `primary.main` at 75% over paper, built from the live palette so it follows the theme.\n */\nexport const getPrimaryWashGradient = ({ palette }: Theme) =>\n `linear-gradient(173deg, ${alpha(palette.primary.light, 0.75)} 46.41%, ${alpha(palette.primary.main, 0.75)} 78.14%)`\n"],"mappings":";AAiBA,IAAa,IACX,+FAGW,IACX,gGAWW,IACX,6FAOW,IACX,0FAMW,IAAA,CAA0B,EAAE,SAAA,EAAA,MACvC,2BAA2B,EAAM,EAAQ,QAAQ,OAAO,IAAI,CAAA,YAAa,EAAM,EAAQ,QAAQ,MAAM,IAAI,CAAA"}
|
|
@@ -1,118 +1,125 @@
|
|
|
1
|
-
import
|
|
1
|
+
import r from "./components/StatusPill.es.js";
|
|
2
2
|
import { resolveInsightRender as m } from "./resolveInsightRender.es.js";
|
|
3
3
|
import { useBeatActions as a } from "./beatActions.es.js";
|
|
4
4
|
import f from "./components/BadgedTile.es.js";
|
|
5
5
|
import { OverflowMenu as n } from "./components/OverflowMenu.es.js";
|
|
6
|
-
import { InsightOptionsMenu as
|
|
7
|
-
import d, { isLogoGuid as
|
|
8
|
-
import
|
|
6
|
+
import { InsightOptionsMenu as l } from "./components/InsightOptionsMenu.es.js";
|
|
7
|
+
import d, { isLogoGuid as g } from "./components/LogoFromGuid.es.js";
|
|
8
|
+
import C from "./components/StatusBadge.es.js";
|
|
9
9
|
import k from "./components/CompactInsightCard.es.js";
|
|
10
10
|
import h from "./components/InsightErrorCard.es.js";
|
|
11
|
-
import { BAR_CHART_VARIANTS as
|
|
11
|
+
import { BAR_CHART_VARIANTS as b, barChartVariant as A, buildChartData as T, buildDataSeries as I } from "./blocks/ChartBlocks/BarchartBlock/utils.es.js";
|
|
12
12
|
import { BarchartBlock as v } from "./blocks/ChartBlocks/BarchartBlock/BarchartBlock.es.js";
|
|
13
|
-
import { DoubleBarChartBlock as
|
|
14
|
-
import
|
|
15
|
-
import
|
|
16
|
-
import
|
|
13
|
+
import { DoubleBarChartBlock as O } from "./blocks/ChartBlocks/DoubleBarChartBlock/DoubleBarChartBlock.es.js";
|
|
14
|
+
import M from "./blocks/ChartBlocks/StepChartBlock/StepChartBlock.es.js";
|
|
15
|
+
import E from "./blocks/ChartBlocks/DonutChartBlock/DonutChartBlock.es.js";
|
|
16
|
+
import R from "./blocks/ChartBlocks/DoubleProgressBarBlock/DoubleProgressBarBlock.es.js";
|
|
17
17
|
import V from "./blocks/ComponentBlocks/AccountBlock/AccountBlock.es.js";
|
|
18
18
|
import G from "./components/TransferLogoCard.es.js";
|
|
19
|
-
import
|
|
20
|
-
import
|
|
19
|
+
import _ from "./blocks/ComponentBlocks/AccountSwitchBlock/AccountSwitchBlock.es.js";
|
|
20
|
+
import W from "./components/AccountHeroCard.es.js";
|
|
21
21
|
import q from "./components/DirectDepositCard.es.js";
|
|
22
22
|
import J from "./blocks/ComponentBlocks/DirectDepositBlock/DirectDepositBlock.es.js";
|
|
23
23
|
import { BudgetBlock as Q } from "./blocks/ComponentBlocks/BudgetBlock/BudgetBlock.es.js";
|
|
24
24
|
import Y from "./components/SaveAnExtraCard.es.js";
|
|
25
25
|
import $ from "./blocks/ComponentBlocks/SaveExtraBlock/SaveExtraBlock.es.js";
|
|
26
|
-
import
|
|
27
|
-
import
|
|
28
|
-
import
|
|
29
|
-
import
|
|
30
|
-
import
|
|
31
|
-
import {
|
|
32
|
-
import
|
|
33
|
-
import
|
|
34
|
-
import
|
|
35
|
-
import
|
|
36
|
-
import
|
|
37
|
-
import
|
|
38
|
-
import
|
|
39
|
-
import {
|
|
40
|
-
import
|
|
41
|
-
import
|
|
42
|
-
import
|
|
43
|
-
import
|
|
44
|
-
import
|
|
45
|
-
import
|
|
46
|
-
import {
|
|
47
|
-
import
|
|
48
|
-
import
|
|
49
|
-
import
|
|
50
|
-
import
|
|
51
|
-
import $
|
|
52
|
-
import
|
|
53
|
-
import
|
|
54
|
-
import
|
|
55
|
-
import
|
|
26
|
+
import ro from "./components/SavingsOpportunityCard.es.js";
|
|
27
|
+
import mo from "./blocks/ComponentBlocks/SavingsOpportunityBlock/SavingsOpportunityBlock.es.js";
|
|
28
|
+
import ao from "./components/InsightTransactionRow.es.js";
|
|
29
|
+
import fo from "./components/TransactionListCard.es.js";
|
|
30
|
+
import { transactionBlockVariant as no } from "./blocks/ComponentBlocks/TransactionBlock/layout.es.js";
|
|
31
|
+
import { TransactionBlock as lo } from "./blocks/ComponentBlocks/TransactionBlock/TransactionBlock.es.js";
|
|
32
|
+
import go from "./components/UpcomingBillCard.es.js";
|
|
33
|
+
import Co from "./blocks/ComponentBlocks/UpcomingBillBlock/UpcomingBillBlock.es.js";
|
|
34
|
+
import ko from "./components/AmountPill.es.js";
|
|
35
|
+
import ho from "./components/SubscriptionHeroCard.es.js";
|
|
36
|
+
import bo from "./blocks/ComponentBlocks/UpcomingSubscriptionBlock/UpcomingSubscriptionBlock.es.js";
|
|
37
|
+
import To from "./components/WithdrawalCard.es.js";
|
|
38
|
+
import Lo from "./blocks/ComponentBlocks/WithdrawalBlock/WithdrawalBlock.es.js";
|
|
39
|
+
import { SVGImageBlock as Ho } from "./blocks/ImageBlocks/SVGImageBlock/SVGImageBlock.es.js";
|
|
40
|
+
import wo from "./components/ConnectionDetailDrillDown.es.js";
|
|
41
|
+
import yo from "./components/DesignateEmergencySavingsCard.es.js";
|
|
42
|
+
import Po from "./components/shared/StatusSnackbar.es.js";
|
|
43
|
+
import Fo from "./components/FeedbackDialog.es.js";
|
|
44
|
+
import xo from "./components/FeedbackModal.es.js";
|
|
45
|
+
import Uo from "./components/SurveyModal.es.js";
|
|
46
|
+
import { ErrorCard as No } from "./components/ErrorCard.es.js";
|
|
47
|
+
import { HOST_ACTIONS as jo } from "./ctaActions/hostActions.es.js";
|
|
48
|
+
import { useBeatCtaActions as zo, useCtaHandler as Jo } from "./ctaActions/useCtaAction.es.js";
|
|
49
|
+
import { FeedbackBar as Qo } from "./components/FeedbackBar.es.js";
|
|
50
|
+
import { DismissInsightDialog as Yo } from "./components/DismissInsightDialog.es.js";
|
|
51
|
+
import { HiddenConfirmationCard as $o } from "./components/HiddenConfirmationCard.es.js";
|
|
52
|
+
import { LoadingCard as rr } from "./components/LoadingCard.es.js";
|
|
53
|
+
import { ObsolesceBanner as mr } from "./components/ObsolesceBanner.es.js";
|
|
54
|
+
import ar from "./components/BaseLayout.es.js";
|
|
55
|
+
import fr from "./components/StatusMessageCard.es.js";
|
|
56
|
+
import nr from "./components/LogoTile.es.js";
|
|
57
|
+
import lr from "./components/LogoClusterCard.es.js";
|
|
58
|
+
import dr from "./components/MerchantHighlightCard.es.js";
|
|
59
|
+
import Br from "./components/P2PLogoStack.es.js";
|
|
56
60
|
export {
|
|
57
61
|
V as AccountBlock,
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
+
W as AccountHeroCard,
|
|
63
|
+
_ as AccountSwitchBlock,
|
|
64
|
+
ko as AmountPill,
|
|
65
|
+
b as BAR_CHART_VARIANTS,
|
|
62
66
|
f as BadgedTile,
|
|
63
67
|
v as BarchartBlock,
|
|
64
|
-
|
|
68
|
+
ar as BaseLayout,
|
|
65
69
|
Q as BudgetBlock,
|
|
66
70
|
k as CompactInsightCard,
|
|
67
|
-
|
|
68
|
-
|
|
71
|
+
wo as ConnectionDetailDrillDown,
|
|
72
|
+
yo as DesignateEmergencySavingsCard,
|
|
69
73
|
J as DirectDepositBlock,
|
|
70
74
|
q as DirectDepositCard,
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
75
|
+
Yo as DismissInsightDialog,
|
|
76
|
+
E as DonutChartBlock,
|
|
77
|
+
O as DoubleBarChartBlock,
|
|
78
|
+
R as DoubleProgressBarBlock,
|
|
79
|
+
No as ErrorCard,
|
|
80
|
+
Qo as FeedbackBar,
|
|
81
|
+
Fo as FeedbackDialog,
|
|
82
|
+
xo as FeedbackModal,
|
|
83
|
+
jo as HOST_ACTIONS,
|
|
84
|
+
$o as HiddenConfirmationCard,
|
|
81
85
|
h as InsightErrorCard,
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
+
l as InsightOptionsMenu,
|
|
87
|
+
ao as InsightTransactionRow,
|
|
88
|
+
rr as LoadingCard,
|
|
89
|
+
lr as LogoClusterCard,
|
|
86
90
|
d as LogoFromGuid,
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
91
|
+
nr as LogoTile,
|
|
92
|
+
dr as MerchantHighlightCard,
|
|
93
|
+
mr as ObsolesceBanner,
|
|
90
94
|
n as OverflowMenu,
|
|
91
|
-
|
|
92
|
-
|
|
95
|
+
Br as P2PLogoStack,
|
|
96
|
+
Ho as SVGImageBlock,
|
|
93
97
|
Y as SaveAnExtraCard,
|
|
94
98
|
$ as SaveExtraBlock,
|
|
95
|
-
mo as
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
99
|
+
mo as SavingsOpportunityBlock,
|
|
100
|
+
ro as SavingsOpportunityCard,
|
|
101
|
+
C as StatusBadge,
|
|
102
|
+
fr as StatusMessageCard,
|
|
103
|
+
r as StatusPill,
|
|
104
|
+
Po as StatusSnackbar,
|
|
105
|
+
M as StepChartBlock,
|
|
106
|
+
ho as SubscriptionHeroCard,
|
|
107
|
+
Uo as SurveyModal,
|
|
108
|
+
lo as TransactionBlock,
|
|
109
|
+
fo as TransactionListCard,
|
|
106
110
|
G as TransferLogoCard,
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
+
Co as UpcomingBillBlock,
|
|
112
|
+
go as UpcomingBillCard,
|
|
113
|
+
bo as UpcomingSubscriptionBlock,
|
|
114
|
+
Lo as WithdrawalBlock,
|
|
115
|
+
To as WithdrawalCard,
|
|
116
|
+
A as barChartVariant,
|
|
111
117
|
T as buildChartData,
|
|
112
118
|
I as buildDataSeries,
|
|
113
|
-
|
|
119
|
+
g as isLogoGuid,
|
|
114
120
|
m as resolveInsightRender,
|
|
121
|
+
no as transactionBlockVariant,
|
|
115
122
|
a as useBeatActions,
|
|
116
|
-
|
|
117
|
-
|
|
123
|
+
zo as useBeatCtaActions,
|
|
124
|
+
Jo as useCtaHandler
|
|
118
125
|
};
|
|
@@ -2,65 +2,68 @@ import { ContactSupportActionBlock as c } from "../actionBlocks/ContactSupportAc
|
|
|
2
2
|
import { actionBlocksKey as o } from "./actionBlocksKey.es.js";
|
|
3
3
|
import { BarchartBlock as m } from "../blocks/ChartBlocks/BarchartBlock/BarchartBlock.es.js";
|
|
4
4
|
import { DoubleBarChartBlock as l } from "../blocks/ChartBlocks/DoubleBarChartBlock/DoubleBarChartBlock.es.js";
|
|
5
|
-
import
|
|
6
|
-
import
|
|
5
|
+
import p from "../blocks/ChartBlocks/StepChartBlock/StepChartBlock.es.js";
|
|
6
|
+
import _ from "../blocks/ChartBlocks/DonutChartBlock/DonutChartBlock.es.js";
|
|
7
7
|
import s from "../blocks/ChartBlocks/DoubleProgressBarBlock/DoubleProgressBarBlock.es.js";
|
|
8
8
|
import C from "../blocks/ComponentBlocks/AccountBlock/AccountBlock.es.js";
|
|
9
9
|
import k from "../blocks/ComponentBlocks/AccountSwitchBlock/AccountSwitchBlock.es.js";
|
|
10
10
|
import B from "../blocks/ComponentBlocks/DirectDepositBlock/DirectDepositBlock.es.js";
|
|
11
11
|
import { BudgetBlock as T } from "../blocks/ComponentBlocks/BudgetBlock/BudgetBlock.es.js";
|
|
12
12
|
import A from "../blocks/ComponentBlocks/SaveExtraBlock/SaveExtraBlock.es.js";
|
|
13
|
+
import u from "../blocks/ComponentBlocks/SavingsOpportunityBlock/SavingsOpportunityBlock.es.js";
|
|
13
14
|
import { TransactionBlock as O } from "../blocks/ComponentBlocks/TransactionBlock/TransactionBlock.es.js";
|
|
14
|
-
import f from "../blocks/ComponentBlocks/
|
|
15
|
-
import
|
|
16
|
-
import
|
|
17
|
-
import
|
|
18
|
-
import {
|
|
19
|
-
import {
|
|
20
|
-
import {
|
|
21
|
-
import {
|
|
22
|
-
import {
|
|
23
|
-
import {
|
|
24
|
-
import {
|
|
25
|
-
import {
|
|
26
|
-
import {
|
|
27
|
-
import {
|
|
28
|
-
import {
|
|
29
|
-
import {
|
|
30
|
-
import {
|
|
31
|
-
import {
|
|
32
|
-
import {
|
|
33
|
-
import {
|
|
15
|
+
import f from "../blocks/ComponentBlocks/UpcomingBillBlock/UpcomingBillBlock.es.js";
|
|
16
|
+
import N from "../blocks/ComponentBlocks/UpcomingSubscriptionBlock/UpcomingSubscriptionBlock.es.js";
|
|
17
|
+
import b from "../blocks/ComponentBlocks/WithdrawalBlock/WithdrawalBlock.es.js";
|
|
18
|
+
import I from "../blocks/ImageBlocks/ImageBlock.es.js";
|
|
19
|
+
import { SVGImageBlock as d } from "../blocks/ImageBlocks/SVGImageBlock/SVGImageBlock.es.js";
|
|
20
|
+
import { FeedbackModalActionBlock as g } from "../actionBlocks/FeedbackModalActionBlock.es.js";
|
|
21
|
+
import { ConnectionDetailActionBlock as L } from "../actionBlocks/ConnectionDetailActionBlock.es.js";
|
|
22
|
+
import { ConnectWidgetActionBlock as D } from "../actionBlocks/ConnectWidgetActionBlock.es.js";
|
|
23
|
+
import { SurveyModalActionBlock as P } from "../actionBlocks/SurveyModalActionBlock.es.js";
|
|
24
|
+
import { PlaceholderActionBlock as h } from "../actionBlocks/PlaceholderActionBlock.es.js";
|
|
25
|
+
import { getMakeTransferDrawerTitle as S } from "../actionBlocks/MakeTransferActionBlock/layout.es.js";
|
|
26
|
+
import { MakeTransferActionBlockLayer as R } from "../actionBlocks/MakeTransferActionBlock/MakeTransferActionBlockLayer.es.js";
|
|
27
|
+
import { getDrawerHeaderTitle as K } from "../actionBlocks/TransactionHistoryBlock/utils.es.js";
|
|
28
|
+
import { TransactionDetailsBlock as E } from "../actionBlocks/TransactionDetailsBlock/TransactionDetailsBlock.es.js";
|
|
29
|
+
import { useTransactionDetailsPrepare as i } from "../actionBlocks/TransactionDetailsBlock/useTransactionDetailsPrepare.es.js";
|
|
30
|
+
import { TransactionHistoryBlock as v } from "../actionBlocks/TransactionHistoryBlock/TransactionHistoryBlock.es.js";
|
|
31
|
+
import { useRecurringTransactionPrepare as a } from "../actionBlocks/RecurringTransactionBlock/useRecurringTransactionPrepare.es.js";
|
|
32
|
+
import { RecurringTransactionBlock as M } from "../actionBlocks/RecurringTransactionBlock/RecurringTransactionBlock.es.js";
|
|
33
|
+
import { TransactionListBlock as w } from "../actionBlocks/TransactionListBlock/TransactionListBlock.es.js";
|
|
34
|
+
import { RemainingCashBlock as y } from "../actionBlocks/RemainingCashBlock/RemainingCashBlock.es.js";
|
|
35
|
+
import { hasDrawerBlock as fo } from "./hasDrawerBlock.es.js";
|
|
36
|
+
import { AmountInputModalBlock as U } from "../actionBlocks/AmountInputModalBlock/AmountInputModalBlock.es.js";
|
|
34
37
|
var r = (e) => {
|
|
35
|
-
},
|
|
38
|
+
}, bo = {
|
|
36
39
|
[o.PLACEHOLDER_ACTION_BLOCK]: {
|
|
37
|
-
Component:
|
|
40
|
+
Component: h,
|
|
38
41
|
usePrepare: r,
|
|
39
42
|
title: () => "Action Block Layer Drilldown"
|
|
40
43
|
},
|
|
41
44
|
[o.MAKE_TRANSFER_ACTION_BLOCK]: {
|
|
42
|
-
Component:
|
|
45
|
+
Component: R,
|
|
43
46
|
usePrepare: r,
|
|
44
|
-
title:
|
|
47
|
+
title: S
|
|
45
48
|
},
|
|
46
49
|
[o.TRANSCATION_HISTORY_ACTION_BLOCK]: {
|
|
47
|
-
Component:
|
|
50
|
+
Component: v,
|
|
48
51
|
usePrepare: r,
|
|
49
|
-
title:
|
|
52
|
+
title: K
|
|
50
53
|
},
|
|
51
54
|
[o.TRANSACTION_DETAILS_ACTION_BLOCK]: {
|
|
52
|
-
Component:
|
|
53
|
-
usePrepare:
|
|
55
|
+
Component: E,
|
|
56
|
+
usePrepare: i,
|
|
54
57
|
title: () => "Transaction Details"
|
|
55
58
|
},
|
|
56
59
|
[o.RECURRING_TRANSACTION_ACTION_BLOCK]: {
|
|
57
|
-
Component:
|
|
58
|
-
usePrepare:
|
|
60
|
+
Component: M,
|
|
61
|
+
usePrepare: a,
|
|
59
62
|
title: (e, t) => t.recurring?.expense_details ?? ""
|
|
60
63
|
},
|
|
61
64
|
[o.REMAINING_CASH_ACTION_BLOCK]: {
|
|
62
|
-
Component:
|
|
63
|
-
usePrepare:
|
|
65
|
+
Component: y,
|
|
66
|
+
usePrepare: a,
|
|
64
67
|
title: (e, t) => t.insights_feed?.remaining_cash?.title ?? ""
|
|
65
68
|
},
|
|
66
69
|
[o.CONTACT_SUPPORT_ACTION_BLOCK]: {
|
|
@@ -69,54 +72,57 @@ var r = (e) => {
|
|
|
69
72
|
title: (e, t) => t.help?.request_support ?? ""
|
|
70
73
|
},
|
|
71
74
|
[o.FEEDBACK_MODAL_ACTION_BLOCK]: {
|
|
72
|
-
Component:
|
|
75
|
+
Component: g,
|
|
73
76
|
usePrepare: r,
|
|
74
77
|
presentation: "modal"
|
|
75
78
|
},
|
|
76
79
|
[o.CONNECTION_DETAIL_ACTION_BLOCK]: {
|
|
77
|
-
Component:
|
|
80
|
+
Component: L,
|
|
78
81
|
usePrepare: r,
|
|
79
82
|
title: (e, t) => t.insights_feed?.connection_details?.connection_details_drawer_title ?? ""
|
|
80
83
|
},
|
|
81
84
|
[o.CONNECT_WIDGET_ACTION_BLOCK]: {
|
|
82
|
-
Component:
|
|
85
|
+
Component: D,
|
|
83
86
|
usePrepare: r
|
|
84
87
|
},
|
|
85
88
|
[o.SURVEY_MODAL_ACTION_BLOCK]: {
|
|
86
|
-
Component:
|
|
89
|
+
Component: P,
|
|
87
90
|
usePrepare: r,
|
|
88
91
|
presentation: "modal"
|
|
89
92
|
},
|
|
90
93
|
[o.TRANSACTION_LIST_ACTION_BLOCK]: {
|
|
91
|
-
Component:
|
|
92
|
-
usePrepare:
|
|
94
|
+
Component: w,
|
|
95
|
+
usePrepare: i,
|
|
93
96
|
title: (e, t, n) => n?.insights_payload?.title ?? ""
|
|
94
97
|
},
|
|
95
98
|
[o.AMOUNT_INPUT_MODAL_ACTION_BLOCK]: {
|
|
96
|
-
Component:
|
|
99
|
+
Component: U,
|
|
97
100
|
presentation: "modal",
|
|
98
101
|
usePrepare: r
|
|
99
102
|
}
|
|
100
|
-
},
|
|
103
|
+
}, Io = {
|
|
101
104
|
account_block: C,
|
|
102
105
|
account_switch_block: k,
|
|
103
106
|
direct_deposit_block: B,
|
|
104
107
|
bar_chart_block: m,
|
|
105
108
|
budget_block: T,
|
|
106
|
-
donut_chart_block:
|
|
109
|
+
donut_chart_block: _,
|
|
107
110
|
double_bar_chart_block: l,
|
|
108
111
|
double_progress_bar_block: s,
|
|
109
|
-
image_block:
|
|
112
|
+
image_block: I,
|
|
110
113
|
save_extra_block: A,
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
+
savings_opportunity_block: u,
|
|
115
|
+
step_chart_block: p,
|
|
116
|
+
svg_image_block: d,
|
|
117
|
+
upcoming_bill_block: f,
|
|
118
|
+
upcoming_subscription_block: N,
|
|
119
|
+
withdrawal_block: b,
|
|
114
120
|
transaction_block: O
|
|
115
121
|
};
|
|
116
122
|
export {
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
123
|
+
bo as actionBlocks,
|
|
124
|
+
Io as blocks,
|
|
125
|
+
fo as hasDrawerBlock
|
|
120
126
|
};
|
|
121
127
|
|
|
122
128
|
//# 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 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 { FeedbackModalActionBlock } from '../actionBlocks/FeedbackModalActionBlock'\nimport { ConnectionDetailActionBlock } from '../actionBlocks/ConnectionDetailActionBlock'\nimport { ConnectWidgetActionBlock } from '../actionBlocks/ConnectWidgetActionBlock'\nimport { SurveyModalActionBlock } from '../actionBlocks/SurveyModalActionBlock'\nimport { PlaceholderActionBlock } from '../actionBlocks/PlaceholderActionBlock'\nimport { MakeTransferActionBlockLayer } from '../actionBlocks/MakeTransferActionBlock/MakeTransferActionBlockLayer'\nimport { getMakeTransferDrawerTitle } from '../actionBlocks/MakeTransferActionBlock/layout'\nimport { TransactionHistoryBlock } from '../actionBlocks/TransactionHistoryBlock/TransactionHistoryBlock'\nimport { getDrawerHeaderTitle } from '../actionBlocks/TransactionHistoryBlock/utils'\nimport {\n TransactionDetailsBlock,\n useTransactionDetailsPrepare,\n} from '../actionBlocks/TransactionDetailsBlock'\nimport {\n RecurringTransactionBlock,\n useRecurringTransactionPrepare,\n} from '../actionBlocks/RecurringTransactionBlock'\nimport { TransactionListBlock } from '../actionBlocks/TransactionListBlock'\nimport { RemainingCashBlock } from '../actionBlocks/RemainingCashBlock'\nimport { AmountInputModalBlock } from '../actionBlocks/AmountInputModalBlock'\n// Keys live in ./actionBlocksKey (imported directly by chart blocks/tests too) to avoid a\n// circular import between this module and the chart blocks — see that file for details.\nimport { actionBlocksKey } from './actionBlocksKey'\n\n// Drilldown indexes are not passed down: action blocks read them from\n// InsightsV2Store (useInsightsV2Store().actionDrawer).\nexport interface ActionBlockProps {\n beat: Beat\n}\n\nconst noop = (_: ActionBlockProps) => {}\n\n// Re-exported so existing `hasDrawerBlock` imports from this module keep working.\nexport { hasDrawerBlock } from './hasDrawerBlock'\n\nexport interface ActionBlockEntry {\n Component: React.ComponentType<ActionBlockProps>\n usePrepare: (props: ActionBlockProps) => void // required; default to noop in each entry\n // Resolves the drawer title from the clicked CTA's variant + copy, with the beat available\n // for blocks that title from beat fields (e.g. transaction-list reads insights_payload.title).\n // Falls back to the CTA label when the resolver returns an empty string / is absent.\n title?: (variant: string | null | undefined, copy: GlobalCopy, beat?: Beat) => string\n // 'drawer' (default) or 'modal' (component renders its own dialog, no Drawer wrapper).\n presentation?: 'drawer' | 'modal'\n}\n\n// Registry of drawer drilldowns, keyed by the `block` name the backend sends\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.FEEDBACK_MODAL_ACTION_BLOCK]: {\n Component: FeedbackModalActionBlock,\n usePrepare: noop,\n presentation: 'modal',\n },\n [actionBlocksKey.CONNECTION_DETAIL_ACTION_BLOCK]: {\n Component: ConnectionDetailActionBlock,\n usePrepare: noop,\n title: (_variant, copy) =>\n copy.insights_feed?.connection_details?.connection_details_drawer_title ?? '',\n },\n // Boots MX's Connect widget (web-widget-sdk iframe) inside the action\n // drawer; the drawer title falls back to the CTA label.\n [actionBlocksKey.CONNECT_WIDGET_ACTION_BLOCK]: {\n Component: ConnectWidgetActionBlock,\n usePrepare: noop,\n },\n [actionBlocksKey.SURVEY_MODAL_ACTION_BLOCK]: {\n Component: SurveyModalActionBlock,\n usePrepare: noop,\n presentation: 'modal',\n },\n [actionBlocksKey.TRANSACTION_LIST_ACTION_BLOCK]: {\n Component: TransactionListBlock,\n usePrepare: useTransactionDetailsPrepare,\n title: (_variant, _copy, beat) => beat?.insights_payload?.title ?? '',\n },\n // One whole-dollar setting in a dialog; the CTA variant picks which (low-balance threshold or\n // safety net). A modal: no drawer, so no drawer title.\n [actionBlocksKey.AMOUNT_INPUT_MODAL_ACTION_BLOCK]: {\n Component: AmountInputModalBlock,\n presentation: 'modal',\n // Loads inside the block: it mounts only while open, so mounting is the open-time load.\n usePrepare: noop,\n },\n} as Record<string, ActionBlockEntry>\n\nexport const blocks = {\n account_block: AccountBlock,\n account_switch_block: AccountSwitchBlock,\n direct_deposit_block: 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":"
|
|
1
|
+
{"version":3,"file":"blocks.es.js","names":[],"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 SavingsOpportunityBlock,\n SVGImageBlock,\n UpcomingBillBlock,\n UpcomingSubscriptionBlock,\n WithdrawalBlock,\n TransactionBlock,\n} from '../blocks'\nimport StepChartBlock from '../blocks/ChartBlocks/StepChartBlock'\nimport ImageBlock from '../blocks/ImageBlocks/ImageBlock'\n\nimport type { Beat, GlobalCopy, InsightsPayload } from '../../core'\nimport { ContactSupportActionBlock } from '../actionBlocks/ContactSupportActionBlock'\nimport { FeedbackModalActionBlock } from '../actionBlocks/FeedbackModalActionBlock'\nimport { ConnectionDetailActionBlock } from '../actionBlocks/ConnectionDetailActionBlock'\nimport { ConnectWidgetActionBlock } from '../actionBlocks/ConnectWidgetActionBlock'\nimport { SurveyModalActionBlock } from '../actionBlocks/SurveyModalActionBlock'\nimport { PlaceholderActionBlock } from '../actionBlocks/PlaceholderActionBlock'\nimport { MakeTransferActionBlockLayer } from '../actionBlocks/MakeTransferActionBlock/MakeTransferActionBlockLayer'\nimport { getMakeTransferDrawerTitle } from '../actionBlocks/MakeTransferActionBlock/layout'\nimport { TransactionHistoryBlock } from '../actionBlocks/TransactionHistoryBlock/TransactionHistoryBlock'\nimport { getDrawerHeaderTitle } from '../actionBlocks/TransactionHistoryBlock/utils'\nimport {\n TransactionDetailsBlock,\n useTransactionDetailsPrepare,\n} from '../actionBlocks/TransactionDetailsBlock'\nimport {\n RecurringTransactionBlock,\n useRecurringTransactionPrepare,\n} from '../actionBlocks/RecurringTransactionBlock'\nimport { TransactionListBlock } from '../actionBlocks/TransactionListBlock'\nimport { RemainingCashBlock } from '../actionBlocks/RemainingCashBlock'\nimport { AmountInputModalBlock } from '../actionBlocks/AmountInputModalBlock'\n// Keys live in ./actionBlocksKey (imported directly by chart blocks/tests too) to avoid a\n// circular import between this module and the chart blocks — see that file for details.\nimport { actionBlocksKey } from './actionBlocksKey'\n\n// Drilldown indexes are not passed down: action blocks read them from\n// InsightsV2Store (useInsightsV2Store().actionDrawer).\nexport interface ActionBlockProps {\n beat: Beat\n}\n\nconst noop = (_: ActionBlockProps) => {}\n\n// Re-exported so existing `hasDrawerBlock` imports from this module keep working.\nexport { hasDrawerBlock } from './hasDrawerBlock'\n\nexport interface ActionBlockEntry {\n Component: React.ComponentType<ActionBlockProps>\n usePrepare: (props: ActionBlockProps) => void // required; default to noop in each entry\n // Resolves the drawer title from the clicked CTA's variant + copy, with the beat available\n // for blocks that title from beat fields (e.g. transaction-list reads insights_payload.title).\n // Falls back to the CTA label when the resolver returns an empty string / is absent.\n title?: (variant: string | null | undefined, copy: GlobalCopy, beat?: Beat) => string\n // 'drawer' (default) or 'modal' (component renders its own dialog, no Drawer wrapper).\n presentation?: 'drawer' | 'modal'\n}\n\n// Registry of drawer drilldowns, keyed by the `block` name the backend sends\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.FEEDBACK_MODAL_ACTION_BLOCK]: {\n Component: FeedbackModalActionBlock,\n usePrepare: noop,\n presentation: 'modal',\n },\n [actionBlocksKey.CONNECTION_DETAIL_ACTION_BLOCK]: {\n Component: ConnectionDetailActionBlock,\n usePrepare: noop,\n title: (_variant, copy) =>\n copy.insights_feed?.connection_details?.connection_details_drawer_title ?? '',\n },\n // Boots MX's Connect widget (web-widget-sdk iframe) inside the action\n // drawer; the drawer title falls back to the CTA label.\n [actionBlocksKey.CONNECT_WIDGET_ACTION_BLOCK]: {\n Component: ConnectWidgetActionBlock,\n usePrepare: noop,\n },\n [actionBlocksKey.SURVEY_MODAL_ACTION_BLOCK]: {\n Component: SurveyModalActionBlock,\n usePrepare: noop,\n presentation: 'modal',\n },\n [actionBlocksKey.TRANSACTION_LIST_ACTION_BLOCK]: {\n Component: TransactionListBlock,\n usePrepare: useTransactionDetailsPrepare,\n title: (_variant, _copy, beat) => beat?.insights_payload?.title ?? '',\n },\n // One whole-dollar setting in a dialog; the CTA variant picks which (low-balance threshold or\n // safety net). A modal: no drawer, so no drawer title.\n [actionBlocksKey.AMOUNT_INPUT_MODAL_ACTION_BLOCK]: {\n Component: AmountInputModalBlock,\n presentation: 'modal',\n // Loads inside the block: it mounts only while open, so mounting is the open-time load.\n usePrepare: noop,\n },\n} as Record<string, ActionBlockEntry>\n\nexport const blocks = {\n account_block: AccountBlock,\n account_switch_block: AccountSwitchBlock,\n direct_deposit_block: 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 savings_opportunity_block: SavingsOpportunityBlock,\n step_chart_block: StepChartBlock,\n svg_image_block: SVGImageBlock,\n upcoming_bill_block: UpcomingBillBlock,\n upcoming_subscription_block: UpcomingSubscriptionBlock,\n withdrawal_block: WithdrawalBlock,\n transaction_block: TransactionBlock,\n} as Record<string, React.ComponentType<{ payload: InsightsPayload; beatGuid?: string }>>\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAoDA,IAAM,IAAA,CAAQ,MAAwB;AAAC,GAsB1B,KAAe;AAAA,EACzB,CAAA,EAAgB,wBAAA,GAA2B;AAAA,IAC1C,WAAW;AAAA,IACX,YAAY;AAAA,IACZ,OAAA,MAAa;AAAA,EACf;AAAA,EACC,CAAA,EAAgB,0BAAA,GAA6B;AAAA,IAC5C,WAAW;AAAA,IACX,YAAY;AAAA,IACZ,OAAO;AAAA,EACT;AAAA,EACC,CAAA,EAAgB,gCAAA,GAAmC;AAAA,IAClD,WAAW;AAAA,IACX,YAAY;AAAA,IACZ,OAAO;AAAA,EACT;AAAA,EACC,CAAA,EAAgB,gCAAA,GAAmC;AAAA,IAClD,WAAW;AAAA,IACX,YAAY;AAAA,IACZ,OAAA,MAAa;AAAA,EACf;AAAA,EAGC,CAAA,EAAgB,kCAAA,GAAqC;AAAA,IACpD,WAAW;AAAA,IACX,YAAY;AAAA,IACZ,OAAA,CAAQ,GAAU,MAAS,EAAK,WAAW,mBAAmB;AAAA,EAChE;AAAA,EAGC,CAAA,EAAgB,2BAAA,GAA8B;AAAA,IAC7C,WAAW;AAAA,IACX,YAAY;AAAA,IACZ,OAAA,CAAQ,GAAU,MAAS,EAAK,eAAe,gBAAgB,SAAS;AAAA,EAC1E;AAAA,EAGC,CAAA,EAAgB,4BAAA,GAA+B;AAAA,IAC9C,WAAW;AAAA,IACX,YAAY;AAAA,IACZ,OAAA,CAAQ,GAAU,MAAS,EAAK,MAAM,mBAAmB;AAAA,EAC3D;AAAA,EACC,CAAA,EAAgB,2BAAA,GAA8B;AAAA,IAC7C,WAAW;AAAA,IACX,YAAY;AAAA,IACZ,cAAc;AAAA,EAChB;AAAA,EACC,CAAA,EAAgB,8BAAA,GAAiC;AAAA,IAChD,WAAW;AAAA,IACX,YAAY;AAAA,IACZ,OAAA,CAAQ,GAAU,MAChB,EAAK,eAAe,oBAAoB,mCAAmC;AAAA,EAC/E;AAAA,EAGC,CAAA,EAAgB,2BAAA,GAA8B;AAAA,IAC7C,WAAW;AAAA,IACX,YAAY;AAAA,EACd;AAAA,EACC,CAAA,EAAgB,yBAAA,GAA4B;AAAA,IAC3C,WAAW;AAAA,IACX,YAAY;AAAA,IACZ,cAAc;AAAA,EAChB;AAAA,EACC,CAAA,EAAgB,6BAAA,GAAgC;AAAA,IAC/C,WAAW;AAAA,IACX,YAAY;AAAA,IACZ,OAAA,CAAQ,GAAU,GAAO,MAAS,GAAM,kBAAkB,SAAS;AAAA,EACrE;AAAA,EAGC,CAAA,EAAgB,+BAAA,GAAkC;AAAA,IACjD,WAAW;AAAA,IACX,cAAc;AAAA,IAEd,YAAY;AAAA,EACd;AACF,GAEa,KAAS;AAAA,EACpB,eAAe;AAAA,EACf,sBAAsB;AAAA,EACtB,sBAAsB;AAAA,EACtB,iBAAiB;AAAA,EACjB,cAAc;AAAA,EACd,mBAAmB;AAAA,EACnB,wBAAwB;AAAA,EACxB,2BAA2B;AAAA,EAC3B,aAAa;AAAA,EACb,kBAAkB;AAAA,EAClB,2BAA2B;AAAA,EAC3B,kBAAkB;AAAA,EAClB,iBAAiB;AAAA,EACjB,qBAAqB;AAAA,EACrB,6BAA6B;AAAA,EAC7B,kBAAkB;AAAA,EAClB,mBAAmB;AACrB"}
|