@mx-cartographer/experiences 9.7.31 → 9.7.32
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 +4 -0
- package/dist/core/constants/InstitutionLogo.d.ts +2 -0
- package/dist/core/constants/InstitutionLogo.es.js +6 -0
- package/dist/core/constants/InstitutionLogo.es.js.map +1 -0
- package/dist/core/constants/index.d.ts +1 -0
- package/dist/core/index.es.js +137 -135
- package/dist/core/types/InsightsInstanceSlotData.d.ts +6 -1
- package/dist/core/types/InsightsInstanceSlotData.es.js.map +1 -1
- package/dist/core/types/localization/InsightsFeedCopy.d.ts +20 -0
- package/dist/core/types/localization/index.d.ts +1 -1
- package/dist/core/utils/SanitizeHtml.d.ts +2 -0
- package/dist/core/utils/SanitizeHtml.es.js +44 -0
- package/dist/core/utils/SanitizeHtml.es.js.map +1 -0
- package/dist/core/utils/index.d.ts +1 -0
- package/dist/dashboard/WelcomeDialog.es.js +78 -115
- package/dist/dashboard/WelcomeDialog.es.js.map +1 -1
- package/dist/insights-v2/actionBlocks/CreditUtilizationBlock/CreditUtilizationBlock.d.ts +10 -0
- package/dist/insights-v2/actionBlocks/CreditUtilizationBlock/CreditUtilizationBlock.es.js +32 -0
- package/dist/insights-v2/actionBlocks/CreditUtilizationBlock/CreditUtilizationBlock.es.js.map +1 -0
- package/dist/insights-v2/actionBlocks/CreditUtilizationBlock/CreditUtilizationContent.d.ts +16 -0
- package/dist/insights-v2/actionBlocks/CreditUtilizationBlock/CreditUtilizationContent.es.js +287 -0
- package/dist/insights-v2/actionBlocks/CreditUtilizationBlock/CreditUtilizationContent.es.js.map +1 -0
- package/dist/insights-v2/actionBlocks/CreditUtilizationBlock/index.d.ts +2 -0
- package/dist/insights-v2/actionBlocks/CreditUtilizationBlock/layout.d.ts +32 -0
- package/dist/insights-v2/actionBlocks/CreditUtilizationBlock/layout.es.js +66 -0
- package/dist/insights-v2/actionBlocks/CreditUtilizationBlock/layout.es.js.map +1 -0
- package/dist/insights-v2/actionBlocks/CreditUtilizationBlock/useCreditUtilizationPrepare.d.ts +1 -0
- package/dist/insights-v2/actionBlocks/CreditUtilizationBlock/useCreditUtilizationPrepare.es.js +13 -0
- package/dist/insights-v2/actionBlocks/CreditUtilizationBlock/useCreditUtilizationPrepare.es.js.map +1 -0
- package/dist/insights-v2/actionBlocks/RemainingCashBlock/RemainingCashBlock.es.js +31 -30
- package/dist/insights-v2/actionBlocks/RemainingCashBlock/RemainingCashBlock.es.js.map +1 -1
- package/dist/insights-v2/actionBlocks/RemainingCashBlock/layout.d.ts +0 -6
- package/dist/insights-v2/actionBlocks/RemainingCashBlock/layout.es.js +13 -14
- package/dist/insights-v2/actionBlocks/RemainingCashBlock/layout.es.js.map +1 -1
- package/dist/insights-v2/mappings/actionBlocksKey.d.ts +1 -0
- package/dist/insights-v2/mappings/actionBlocksKey.es.js +1 -0
- package/dist/insights-v2/mappings/actionBlocksKey.es.js.map +1 -1
- package/dist/insights-v2/mappings/blocks.es.js +76 -69
- package/dist/insights-v2/mappings/blocks.es.js.map +1 -1
- package/package.json +1 -1
|
@@ -1,26 +1,25 @@
|
|
|
1
1
|
import { buildDynamicCopy as a, buildPluralCopy as i } from "../../../core/utils/Localization.es.js";
|
|
2
|
-
import { formatCurrency as
|
|
3
|
-
var m =
|
|
4
|
-
const
|
|
5
|
-
if (
|
|
6
|
-
const n =
|
|
2
|
+
import { formatCurrency as u } from "../../../core/utils/NumberFormatting.es.js";
|
|
3
|
+
var m = (t) => {
|
|
4
|
+
const r = [...t].sort((e, o) => o.amount - e.amount);
|
|
5
|
+
if (r.length <= 2) return { shown: r };
|
|
6
|
+
const n = r.slice(2);
|
|
7
7
|
return {
|
|
8
|
-
shown:
|
|
8
|
+
shown: r.slice(0, 2),
|
|
9
9
|
others: {
|
|
10
10
|
count: n.length,
|
|
11
11
|
total: n.reduce((e, o) => e + o.amount, 0)
|
|
12
12
|
}
|
|
13
13
|
};
|
|
14
|
-
}, c = (
|
|
15
|
-
const
|
|
16
|
-
return
|
|
17
|
-
},
|
|
14
|
+
}, c = (t) => {
|
|
15
|
+
const r = Math.round(Math.abs(t) * 100), n = u(r / 100, "0,0.00");
|
|
16
|
+
return t < 0 && r > 0 ? `-${n}` : n;
|
|
17
|
+
}, g = (t, r) => r === 1 ? t.remaining_until_payday_one : a(t.remaining_until_payday, String(r)), d = (t, r, n) => i(t, r, n, String(n));
|
|
18
18
|
export {
|
|
19
|
-
m as DEFAULT_INSTITUTION_LOGO_URL,
|
|
20
19
|
c as formatSignedCurrency,
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
20
|
+
g as getCaption,
|
|
21
|
+
d as getOtherLabel,
|
|
22
|
+
m as groupRows
|
|
24
23
|
};
|
|
25
24
|
|
|
26
25
|
//# sourceMappingURL=layout.es.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"layout.es.js","names":[],"sources":["../../../../src/insights-v2/actionBlocks/RemainingCashBlock/layout.ts"],"sourcesContent":["import type { RemainingCashCopy } from '../../../core'\nimport { buildDynamicCopy, buildPluralCopy } from '../../../core/utils/Localization'\nimport { formatCurrency } from '../../../core/utils/NumberFormatting'\n\n/** Rows shown per section before the rest fold into an \"Other (#)\" row (Figma shows two). */\nexport const ROW_LIMIT = 2\n\
|
|
1
|
+
{"version":3,"file":"layout.es.js","names":[],"sources":["../../../../src/insights-v2/actionBlocks/RemainingCashBlock/layout.ts"],"sourcesContent":["import type { RemainingCashCopy } from '../../../core'\nimport { buildDynamicCopy, buildPluralCopy } from '../../../core/utils/Localization'\nimport { formatCurrency } from '../../../core/utils/NumberFormatting'\n\n/** Rows shown per section before the rest fold into an \"Other (#)\" row (Figma shows two). */\nexport const ROW_LIMIT = 2\n\nexport interface GroupedRows<T> {\n shown: T[]\n others?: { count: number; total: number }\n}\n\n/** Largest rows first (stable for ties), capped at `ROW_LIMIT`; the remainder as a count and total. */\nexport const groupRows = <T extends { amount: number }>(rows: T[]): GroupedRows<T> => {\n const sorted = [...rows].sort((a, b) => b.amount - a.amount)\n\n if (sorted.length <= ROW_LIMIT) return { shown: sorted }\n\n const rest = sorted.slice(ROW_LIMIT)\n\n return {\n shown: sorted.slice(0, ROW_LIMIT),\n others: { count: rest.length, total: rest.reduce((total, r) => total + r.amount, 0) },\n }\n}\n\n/**\n * `-$220.00`, not `$-220.00`: the sign goes before the currency symbol. Rounded to cents first so a\n * sub-cent negative (or `-0`) reads `$0.00`, never `-$0.00`.\n */\nexport const formatSignedCurrency = (amount: number): string => {\n const cents = Math.round(Math.abs(amount) * 100)\n const formatted = formatCurrency(cents / 100, '0,0.00')\n\n return amount < 0 && cents > 0 ? `-${formatted}` : formatted\n}\n\nexport const getCaption = (copy: RemainingCashCopy, days: number): string => {\n if (days === 1) return copy.remaining_until_payday_one\n\n return buildDynamicCopy(copy.remaining_until_payday, String(days)) as string\n}\n\nexport const getOtherLabel = (templateOne: string, templateMulti: string, count: number): string =>\n buildPluralCopy(templateOne, templateMulti, count, String(count)) as string\n"],"mappings":";;AAaA,IAAa,IAAA,CAA2C,MAA8B;AACpF,QAAM,IAAS,CAAC,GAAG,CAAI,EAAE,KAAA,CAAM,GAAG,MAAM,EAAE,SAAS,EAAE,MAAM;AAE3D,MAAI,EAAO,UAAA,EAAqB,QAAO,EAAE,OAAO,EAAO;AAEvD,QAAM,IAAO,EAAO,MAAA,CAAe;AAEnC,SAAO;AAAA,IACL,OAAO,EAAO,MAAM,GAAA,CAAY;AAAA,IAChC,QAAQ;AAAA,MAAE,OAAO,EAAK;AAAA,MAAQ,OAAO,EAAK,OAAA,CAAQ,GAAO,MAAM,IAAQ,EAAE,QAAQ,CAAC;AAAA,IAAE;AAAA,EACtF;AACF,GAMa,IAAA,CAAwB,MAA2B;AAC9D,QAAM,IAAQ,KAAK,MAAM,KAAK,IAAI,CAAM,IAAI,GAAG,GACzC,IAAY,EAAe,IAAQ,KAAK,QAAQ;AAEtD,SAAO,IAAS,KAAK,IAAQ,IAAI,IAAI,CAAA,KAAc;AACrD,GAEa,IAAA,CAAc,GAAyB,MAC9C,MAAS,IAAU,EAAK,6BAErB,EAAiB,EAAK,wBAAwB,OAAO,CAAI,CAAC,GAGtD,IAAA,CAAiB,GAAqB,GAAuB,MACxE,EAAgB,GAAa,GAAe,GAAO,OAAO,CAAK,CAAC"}
|
|
@@ -12,6 +12,7 @@ export declare const actionBlocksKey: {
|
|
|
12
12
|
TRANSACTION_LIST_ACTION_BLOCK: string;
|
|
13
13
|
REMAINING_CASH_ACTION_BLOCK: string;
|
|
14
14
|
AMOUNT_INPUT_MODAL_ACTION_BLOCK: string;
|
|
15
|
+
CREDIT_UTILIZATION_ACTION_BLOCK: string;
|
|
15
16
|
EMERGENCY_SAVINGS_ACTION_BLOCK: string;
|
|
16
17
|
PAYOFF_CALCULATOR_ACTION_BLOCK: string;
|
|
17
18
|
};
|
|
@@ -12,6 +12,7 @@ var _ = {
|
|
|
12
12
|
TRANSACTION_LIST_ACTION_BLOCK: "transaction_list_block",
|
|
13
13
|
REMAINING_CASH_ACTION_BLOCK: "remaining_cash_block",
|
|
14
14
|
AMOUNT_INPUT_MODAL_ACTION_BLOCK: "amount_input_modal_block",
|
|
15
|
+
CREDIT_UTILIZATION_ACTION_BLOCK: "credit_utilization_block",
|
|
15
16
|
EMERGENCY_SAVINGS_ACTION_BLOCK: "emergency_savings_block",
|
|
16
17
|
PAYOFF_CALCULATOR_ACTION_BLOCK: "payoff_calculator_block"
|
|
17
18
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"actionBlocksKey.es.js","names":[],"sources":["../../../src/insights-v2/mappings/actionBlocksKey.ts"],"sourcesContent":["// Keys for the drawer drilldown registry in `blocks.ts`, extracted into their own module.\n//\n// Why: chart blocks (e.g. BarchartBlock, DoubleBarChartBlock) need\n// `TRANSCATION_HISTORY_ACTION_BLOCK` to tag a chart bar's drilldown context, but they are\n// themselves re-exported through `../blocks` -> `mappings/blocks.ts` imports from that same\n// barrel to build its `blocks` registry. Importing the key straight from `mappings/blocks.ts`\n// closed that loop into a circular import: evaluating `mappings/blocks.ts` pulled in the\n// `blocks` barrel, which (before it got to `ComponentBlocks`/`AccountBlock`) loaded\n// `BarchartBlock`, which imported back into the still-initializing `mappings/blocks.ts` —\n// tripping a \"Cannot access 'AccountBlock' before initialization\" TDZ error in Storybook/Vite.\n//\n// Keeping the keys here (no dependency on `mappings/blocks.ts`) lets chart blocks reference\n// them without re-entering that module.\n//\n// Names follow ditto: its registry ends every CTA block in `_block` and the V2 envelope copies those\n// names verbatim (`transaction_details_block`, `contact_support_block`, `make_transfer_block`).\nexport const actionBlocksKey = {\n PLACEHOLDER_ACTION_BLOCK: 'placeholder_block',\n MAKE_TRANSFER_ACTION_BLOCK: 'make_transfer_block',\n TRANSCATION_HISTORY_ACTION_BLOCK: 'transaction_history_block',\n TRANSACTION_DETAILS_ACTION_BLOCK: 'transaction_details_block',\n CONTACT_SUPPORT_ACTION_BLOCK: 'contact_support_block',\n FEEDBACK_MODAL_ACTION_BLOCK: 'feedback_modal_block',\n CONNECTION_DETAIL_ACTION_BLOCK: 'connection_detail_block',\n CONNECT_WIDGET_ACTION_BLOCK: 'connect_widget_block',\n SURVEY_MODAL_ACTION_BLOCK: 'survey_modal_block',\n RECURRING_TRANSACTION_ACTION_BLOCK: 'recurring_transaction_block',\n TRANSACTION_LIST_ACTION_BLOCK: 'transaction_list_block',\n REMAINING_CASH_ACTION_BLOCK: 'remaining_cash_block',\n AMOUNT_INPUT_MODAL_ACTION_BLOCK: 'amount_input_modal_block',\n EMERGENCY_SAVINGS_ACTION_BLOCK: 'emergency_savings_block',\n PAYOFF_CALCULATOR_ACTION_BLOCK: 'payoff_calculator_block',\n}\n"],"mappings":"AAgBA,IAAa,IAAkB;AAAA,EAC7B,0BAA0B;AAAA,EAC1B,4BAA4B;AAAA,EAC5B,kCAAkC;AAAA,EAClC,kCAAkC;AAAA,EAClC,8BAA8B;AAAA,EAC9B,6BAA6B;AAAA,EAC7B,gCAAgC;AAAA,EAChC,6BAA6B;AAAA,EAC7B,2BAA2B;AAAA,EAC3B,oCAAoC;AAAA,EACpC,+BAA+B;AAAA,EAC/B,6BAA6B;AAAA,EAC7B,iCAAiC;AAAA,EACjC,gCAAgC;AAAA,EAChC,gCAAgC;AAClC"}
|
|
1
|
+
{"version":3,"file":"actionBlocksKey.es.js","names":[],"sources":["../../../src/insights-v2/mappings/actionBlocksKey.ts"],"sourcesContent":["// Keys for the drawer drilldown registry in `blocks.ts`, extracted into their own module.\n//\n// Why: chart blocks (e.g. BarchartBlock, DoubleBarChartBlock) need\n// `TRANSCATION_HISTORY_ACTION_BLOCK` to tag a chart bar's drilldown context, but they are\n// themselves re-exported through `../blocks` -> `mappings/blocks.ts` imports from that same\n// barrel to build its `blocks` registry. Importing the key straight from `mappings/blocks.ts`\n// closed that loop into a circular import: evaluating `mappings/blocks.ts` pulled in the\n// `blocks` barrel, which (before it got to `ComponentBlocks`/`AccountBlock`) loaded\n// `BarchartBlock`, which imported back into the still-initializing `mappings/blocks.ts` —\n// tripping a \"Cannot access 'AccountBlock' before initialization\" TDZ error in Storybook/Vite.\n//\n// Keeping the keys here (no dependency on `mappings/blocks.ts`) lets chart blocks reference\n// them without re-entering that module.\n//\n// Names follow ditto: its registry ends every CTA block in `_block` and the V2 envelope copies those\n// names verbatim (`transaction_details_block`, `contact_support_block`, `make_transfer_block`).\nexport const actionBlocksKey = {\n PLACEHOLDER_ACTION_BLOCK: 'placeholder_block',\n MAKE_TRANSFER_ACTION_BLOCK: 'make_transfer_block',\n TRANSCATION_HISTORY_ACTION_BLOCK: 'transaction_history_block',\n TRANSACTION_DETAILS_ACTION_BLOCK: 'transaction_details_block',\n CONTACT_SUPPORT_ACTION_BLOCK: 'contact_support_block',\n FEEDBACK_MODAL_ACTION_BLOCK: 'feedback_modal_block',\n CONNECTION_DETAIL_ACTION_BLOCK: 'connection_detail_block',\n CONNECT_WIDGET_ACTION_BLOCK: 'connect_widget_block',\n SURVEY_MODAL_ACTION_BLOCK: 'survey_modal_block',\n RECURRING_TRANSACTION_ACTION_BLOCK: 'recurring_transaction_block',\n TRANSACTION_LIST_ACTION_BLOCK: 'transaction_list_block',\n REMAINING_CASH_ACTION_BLOCK: 'remaining_cash_block',\n AMOUNT_INPUT_MODAL_ACTION_BLOCK: 'amount_input_modal_block',\n CREDIT_UTILIZATION_ACTION_BLOCK: 'credit_utilization_block',\n EMERGENCY_SAVINGS_ACTION_BLOCK: 'emergency_savings_block',\n PAYOFF_CALCULATOR_ACTION_BLOCK: 'payoff_calculator_block',\n}\n"],"mappings":"AAgBA,IAAa,IAAkB;AAAA,EAC7B,0BAA0B;AAAA,EAC1B,4BAA4B;AAAA,EAC5B,kCAAkC;AAAA,EAClC,kCAAkC;AAAA,EAClC,8BAA8B;AAAA,EAC9B,6BAA6B;AAAA,EAC7B,gCAAgC;AAAA,EAChC,6BAA6B;AAAA,EAC7B,2BAA2B;AAAA,EAC3B,oCAAoC;AAAA,EACpC,+BAA+B;AAAA,EAC/B,6BAA6B;AAAA,EAC7B,iCAAiC;AAAA,EACjC,iCAAiC;AAAA,EACjC,gCAAgC;AAAA,EAChC,gCAAgC;AAClC"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { ContactSupportActionBlock as p } from "../actionBlocks/ContactSupportActionBlock.es.js";
|
|
2
|
-
import { hasDrawerBlock as
|
|
2
|
+
import { hasDrawerBlock as J } from "./hasDrawerBlock.es.js";
|
|
3
3
|
import { actionBlocksKey as o } from "./actionBlocksKey.es.js";
|
|
4
4
|
import { BarchartBlock as m } from "../blocks/ChartBlocks/BarchartBlock/BarchartBlock.es.js";
|
|
5
5
|
import { DoubleBarChartBlock as _ } from "../blocks/ChartBlocks/DoubleBarChartBlock/DoubleBarChartBlock.es.js";
|
|
@@ -14,121 +14,128 @@ import T from "../blocks/ComponentBlocks/DebtsBlock/DebtsBlock.es.js";
|
|
|
14
14
|
import O from "../blocks/ComponentBlocks/GoalsBlock/GoalsBlock.es.js";
|
|
15
15
|
import N from "../blocks/ComponentBlocks/NoSpendDaysBlock/NoSpendDaysBlock.es.js";
|
|
16
16
|
import n from "../blocks/ComponentBlocks/RepeatingTransactionBlock/RepeatingTransactionBlock.es.js";
|
|
17
|
-
import
|
|
18
|
-
import
|
|
19
|
-
import { TransactionBlock as
|
|
20
|
-
import
|
|
17
|
+
import d from "../blocks/ComponentBlocks/SaveExtraBlock/SaveExtraBlock.es.js";
|
|
18
|
+
import I from "../blocks/ComponentBlocks/SavingsOpportunityBlock/SavingsOpportunityBlock.es.js";
|
|
19
|
+
import { TransactionBlock as g } from "../blocks/ComponentBlocks/TransactionBlock/TransactionBlock.es.js";
|
|
20
|
+
import b from "../blocks/ComponentBlocks/UpcomingSubscriptionBlock/UpcomingSubscriptionBlock.es.js";
|
|
21
21
|
import P from "../blocks/ComponentBlocks/WithdrawalBlock/WithdrawalBlock.es.js";
|
|
22
22
|
import L from "../blocks/ImageBlocks/ImageBlock.es.js";
|
|
23
|
-
import { SVGImageBlock as
|
|
24
|
-
import { FeedbackModalActionBlock as
|
|
25
|
-
import { ConnectionDetailActionBlock as
|
|
23
|
+
import { SVGImageBlock as h } from "../blocks/ImageBlocks/SVGImageBlock/SVGImageBlock.es.js";
|
|
24
|
+
import { FeedbackModalActionBlock as D } from "../actionBlocks/FeedbackModalActionBlock.es.js";
|
|
25
|
+
import { ConnectionDetailActionBlock as S } from "../actionBlocks/ConnectionDetailActionBlock.es.js";
|
|
26
26
|
import { ConnectWidgetActionBlock as E } from "../actionBlocks/ConnectWidgetActionBlock.es.js";
|
|
27
27
|
import { SurveyModalActionBlock as R } from "../actionBlocks/SurveyModalActionBlock.es.js";
|
|
28
|
-
import { PlaceholderActionBlock as
|
|
29
|
-
import { getMakeTransferDrawerTitle as
|
|
28
|
+
import { PlaceholderActionBlock as K } from "../actionBlocks/PlaceholderActionBlock.es.js";
|
|
29
|
+
import { getMakeTransferDrawerTitle as y } from "../actionBlocks/MakeTransferActionBlock/layout.es.js";
|
|
30
30
|
import { MakeTransferActionBlockLayer as v } from "../actionBlocks/MakeTransferActionBlock/MakeTransferActionBlockLayer.es.js";
|
|
31
31
|
import { getDrawerHeaderTitle as M } from "../actionBlocks/TransactionHistoryBlock/utils.es.js";
|
|
32
32
|
import { TransactionDetailsBlock as w } from "../actionBlocks/TransactionDetailsBlock/TransactionDetailsBlock.es.js";
|
|
33
33
|
import { useTransactionDetailsPrepare as c } from "../actionBlocks/TransactionDetailsBlock/useTransactionDetailsPrepare.es.js";
|
|
34
|
-
import { TransactionHistoryBlock as
|
|
34
|
+
import { TransactionHistoryBlock as U } from "../actionBlocks/TransactionHistoryBlock/TransactionHistoryBlock.es.js";
|
|
35
35
|
import { useRecurringTransactionPrepare as l } from "../actionBlocks/RecurringTransactionBlock/useRecurringTransactionPrepare.es.js";
|
|
36
|
-
import { RecurringTransactionBlock as
|
|
36
|
+
import { RecurringTransactionBlock as G } from "../actionBlocks/RecurringTransactionBlock/RecurringTransactionBlock.es.js";
|
|
37
37
|
import { TransactionListBlock as F } from "../actionBlocks/TransactionListBlock/TransactionListBlock.es.js";
|
|
38
38
|
import { RemainingCashBlock as H } from "../actionBlocks/RemainingCashBlock/RemainingCashBlock.es.js";
|
|
39
39
|
import { AmountInputModalBlock as x } from "../actionBlocks/AmountInputModalBlock/AmountInputModalBlock.es.js";
|
|
40
40
|
import { EmergencySavingsBlock as Y } from "../actionBlocks/EmergencySavingsBlock/EmergencySavingsBlock.es.js";
|
|
41
|
-
import {
|
|
42
|
-
|
|
43
|
-
|
|
41
|
+
import { CreditUtilizationBlock as z } from "../actionBlocks/CreditUtilizationBlock/CreditUtilizationBlock.es.js";
|
|
42
|
+
import { useCreditUtilizationPrepare as V } from "../actionBlocks/CreditUtilizationBlock/useCreditUtilizationPrepare.es.js";
|
|
43
|
+
import { PayoffCalculatorBlock as W, usePayoffCalculatorPrepare as q } from "../actionBlocks/PayoffCalculatorBlock/PayoffCalculatorBlock.es.js";
|
|
44
|
+
var i = (r) => {
|
|
45
|
+
}, t = (r) => ({
|
|
44
46
|
get Component() {
|
|
45
|
-
return
|
|
47
|
+
return r().Component;
|
|
46
48
|
},
|
|
47
49
|
get usePrepare() {
|
|
48
|
-
return
|
|
50
|
+
return r().usePrepare;
|
|
49
51
|
},
|
|
50
52
|
get title() {
|
|
51
|
-
return
|
|
53
|
+
return r().title;
|
|
52
54
|
},
|
|
53
55
|
get presentation() {
|
|
54
|
-
return
|
|
56
|
+
return r().presentation;
|
|
55
57
|
}
|
|
56
|
-
}),
|
|
57
|
-
[o.PLACEHOLDER_ACTION_BLOCK]:
|
|
58
|
-
Component:
|
|
59
|
-
usePrepare:
|
|
58
|
+
}), Go = {
|
|
59
|
+
[o.PLACEHOLDER_ACTION_BLOCK]: t(() => ({
|
|
60
|
+
Component: K,
|
|
61
|
+
usePrepare: i,
|
|
60
62
|
title: () => "Action Block Layer Drilldown"
|
|
61
63
|
})),
|
|
62
|
-
[o.MAKE_TRANSFER_ACTION_BLOCK]:
|
|
64
|
+
[o.MAKE_TRANSFER_ACTION_BLOCK]: t(() => ({
|
|
63
65
|
Component: v,
|
|
64
|
-
usePrepare:
|
|
65
|
-
title:
|
|
66
|
+
usePrepare: i,
|
|
67
|
+
title: y
|
|
66
68
|
})),
|
|
67
|
-
[o.TRANSCATION_HISTORY_ACTION_BLOCK]:
|
|
68
|
-
Component:
|
|
69
|
-
usePrepare:
|
|
69
|
+
[o.TRANSCATION_HISTORY_ACTION_BLOCK]: t(() => ({
|
|
70
|
+
Component: U,
|
|
71
|
+
usePrepare: i,
|
|
70
72
|
title: M
|
|
71
73
|
})),
|
|
72
|
-
[o.TRANSACTION_DETAILS_ACTION_BLOCK]:
|
|
74
|
+
[o.TRANSACTION_DETAILS_ACTION_BLOCK]: t(() => ({
|
|
73
75
|
Component: w,
|
|
74
76
|
usePrepare: c,
|
|
75
77
|
title: () => "Transaction Details"
|
|
76
78
|
})),
|
|
77
|
-
[o.RECURRING_TRANSACTION_ACTION_BLOCK]:
|
|
78
|
-
Component:
|
|
79
|
+
[o.RECURRING_TRANSACTION_ACTION_BLOCK]: t(() => ({
|
|
80
|
+
Component: G,
|
|
79
81
|
usePrepare: l,
|
|
80
|
-
title: (
|
|
82
|
+
title: (r, e) => e.recurring?.expense_details ?? ""
|
|
81
83
|
})),
|
|
82
|
-
[o.REMAINING_CASH_ACTION_BLOCK]:
|
|
84
|
+
[o.REMAINING_CASH_ACTION_BLOCK]: t(() => ({
|
|
83
85
|
Component: H,
|
|
84
86
|
usePrepare: l,
|
|
85
|
-
title: (
|
|
87
|
+
title: (r, e) => e.insights_feed?.remaining_cash?.title ?? ""
|
|
86
88
|
})),
|
|
87
|
-
[o.CONTACT_SUPPORT_ACTION_BLOCK]:
|
|
89
|
+
[o.CONTACT_SUPPORT_ACTION_BLOCK]: t(() => ({
|
|
88
90
|
Component: p,
|
|
89
|
-
usePrepare:
|
|
90
|
-
title: (
|
|
91
|
+
usePrepare: i,
|
|
92
|
+
title: (r, e) => e.help?.request_support ?? ""
|
|
91
93
|
})),
|
|
92
|
-
[o.FEEDBACK_MODAL_ACTION_BLOCK]:
|
|
93
|
-
Component:
|
|
94
|
-
usePrepare:
|
|
94
|
+
[o.FEEDBACK_MODAL_ACTION_BLOCK]: t(() => ({
|
|
95
|
+
Component: D,
|
|
96
|
+
usePrepare: i,
|
|
95
97
|
presentation: "modal"
|
|
96
98
|
})),
|
|
97
|
-
[o.CONNECTION_DETAIL_ACTION_BLOCK]:
|
|
98
|
-
Component:
|
|
99
|
-
usePrepare:
|
|
100
|
-
title: (
|
|
99
|
+
[o.CONNECTION_DETAIL_ACTION_BLOCK]: t(() => ({
|
|
100
|
+
Component: S,
|
|
101
|
+
usePrepare: i,
|
|
102
|
+
title: (r, e) => e.insights_feed?.connection_details?.connection_details_drawer_title ?? ""
|
|
101
103
|
})),
|
|
102
|
-
[o.CONNECT_WIDGET_ACTION_BLOCK]:
|
|
104
|
+
[o.CONNECT_WIDGET_ACTION_BLOCK]: t(() => ({
|
|
103
105
|
Component: E,
|
|
104
|
-
usePrepare:
|
|
106
|
+
usePrepare: i
|
|
105
107
|
})),
|
|
106
|
-
[o.SURVEY_MODAL_ACTION_BLOCK]:
|
|
108
|
+
[o.SURVEY_MODAL_ACTION_BLOCK]: t(() => ({
|
|
107
109
|
Component: R,
|
|
108
|
-
usePrepare:
|
|
110
|
+
usePrepare: i,
|
|
109
111
|
presentation: "modal"
|
|
110
112
|
})),
|
|
111
|
-
[o.TRANSACTION_LIST_ACTION_BLOCK]:
|
|
113
|
+
[o.TRANSACTION_LIST_ACTION_BLOCK]: t(() => ({
|
|
112
114
|
Component: F,
|
|
113
115
|
usePrepare: c,
|
|
114
|
-
title: (
|
|
116
|
+
title: (r, e, a) => a?.insights_payload?.title ?? ""
|
|
115
117
|
})),
|
|
116
|
-
[o.AMOUNT_INPUT_MODAL_ACTION_BLOCK]:
|
|
118
|
+
[o.AMOUNT_INPUT_MODAL_ACTION_BLOCK]: t(() => ({
|
|
117
119
|
Component: x,
|
|
118
120
|
presentation: "modal",
|
|
119
|
-
usePrepare:
|
|
121
|
+
usePrepare: i
|
|
122
|
+
})),
|
|
123
|
+
[o.CREDIT_UTILIZATION_ACTION_BLOCK]: t(() => ({
|
|
124
|
+
Component: z,
|
|
125
|
+
usePrepare: V,
|
|
126
|
+
title: (r, e) => e.insights_feed?.credit_utilization?.title ?? ""
|
|
120
127
|
})),
|
|
121
|
-
[o.EMERGENCY_SAVINGS_ACTION_BLOCK]:
|
|
128
|
+
[o.EMERGENCY_SAVINGS_ACTION_BLOCK]: t(() => ({
|
|
122
129
|
Component: Y,
|
|
123
|
-
usePrepare:
|
|
124
|
-
title: (
|
|
130
|
+
usePrepare: i,
|
|
131
|
+
title: (r, e, a) => a?.insights_payload?.title ?? ""
|
|
125
132
|
})),
|
|
126
|
-
[o.PAYOFF_CALCULATOR_ACTION_BLOCK]:
|
|
127
|
-
Component:
|
|
128
|
-
usePrepare:
|
|
129
|
-
title: (
|
|
133
|
+
[o.PAYOFF_CALCULATOR_ACTION_BLOCK]: t(() => ({
|
|
134
|
+
Component: W,
|
|
135
|
+
usePrepare: q,
|
|
136
|
+
title: (r, e) => e.insights_feed?.payoff_calculator?.title ?? ""
|
|
130
137
|
}))
|
|
131
|
-
},
|
|
138
|
+
}, Fo = {
|
|
132
139
|
account_block: u,
|
|
133
140
|
account_switch_block: f,
|
|
134
141
|
direct_deposit_block: B,
|
|
@@ -142,19 +149,19 @@ var a = (t) => {
|
|
|
142
149
|
image_block: L,
|
|
143
150
|
no_spend_days_block: N,
|
|
144
151
|
repeating_transaction_block: n,
|
|
145
|
-
save_extra_block:
|
|
146
|
-
savings_opportunity_block:
|
|
152
|
+
save_extra_block: d,
|
|
153
|
+
savings_opportunity_block: I,
|
|
147
154
|
step_chart_block: s,
|
|
148
|
-
svg_image_block:
|
|
155
|
+
svg_image_block: h,
|
|
149
156
|
upcoming_bill_block: n,
|
|
150
|
-
upcoming_subscription_block:
|
|
157
|
+
upcoming_subscription_block: b,
|
|
151
158
|
withdrawal_block: P,
|
|
152
|
-
transaction_block:
|
|
159
|
+
transaction_block: g
|
|
153
160
|
};
|
|
154
161
|
export {
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
162
|
+
Go as actionBlocks,
|
|
163
|
+
Fo as blocks,
|
|
164
|
+
J as hasDrawerBlock
|
|
158
165
|
};
|
|
159
166
|
|
|
160
167
|
//# sourceMappingURL=blocks.es.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"blocks.es.js","names":[],"sources":["../../../src/insights-v2/mappings/blocks.ts"],"sourcesContent":["import {\n AccountBlock,\n AccountSwitchBlock,\n BarchartBlock,\n BudgetBlock,\n DebtsBlock,\n DetailedAccountBlock,\n DonutChartBlock,\n GoalsBlock,\n DoubleBarChartBlock,\n DoubleProgressBarBlock,\n NoSpendDaysBlock,\n RepeatingTransactionBlock,\n SaveExtraBlock,\n SavingsOpportunityBlock,\n SVGImageBlock,\n UpcomingSubscriptionBlock,\n WithdrawalBlock,\n TransactionBlock,\n} from '../blocks'\nimport StepChartBlock from '../blocks/ChartBlocks/StepChartBlock'\nimport ImageBlock from '../blocks/ImageBlocks/ImageBlock'\n\nimport type { Beat, GlobalCopy, InsightsPayload } from '../../core'\nimport { ContactSupportActionBlock } from '../actionBlocks/ContactSupportActionBlock'\nimport { FeedbackModalActionBlock } from '../actionBlocks/FeedbackModalActionBlock'\nimport { ConnectionDetailActionBlock } from '../actionBlocks/ConnectionDetailActionBlock'\nimport { ConnectWidgetActionBlock } from '../actionBlocks/ConnectWidgetActionBlock'\nimport { SurveyModalActionBlock } from '../actionBlocks/SurveyModalActionBlock'\nimport { PlaceholderActionBlock } from '../actionBlocks/PlaceholderActionBlock'\nimport { MakeTransferActionBlockLayer } from '../actionBlocks/MakeTransferActionBlock/MakeTransferActionBlockLayer'\nimport { getMakeTransferDrawerTitle } from '../actionBlocks/MakeTransferActionBlock/layout'\nimport { TransactionHistoryBlock } from '../actionBlocks/TransactionHistoryBlock/TransactionHistoryBlock'\nimport { getDrawerHeaderTitle } from '../actionBlocks/TransactionHistoryBlock/utils'\nimport {\n TransactionDetailsBlock,\n useTransactionDetailsPrepare,\n} from '../actionBlocks/TransactionDetailsBlock'\nimport {\n RecurringTransactionBlock,\n useRecurringTransactionPrepare,\n} from '../actionBlocks/RecurringTransactionBlock'\nimport { TransactionListBlock } from '../actionBlocks/TransactionListBlock'\nimport { RemainingCashBlock } from '../actionBlocks/RemainingCashBlock'\nimport { AmountInputModalBlock } from '../actionBlocks/AmountInputModalBlock'\nimport { EmergencySavingsBlock } from '../actionBlocks/EmergencySavingsBlock'\nimport {\n PayoffCalculatorBlock,\n usePayoffCalculatorPrepare,\n} from '../actionBlocks/PayoffCalculatorBlock'\n// Keys live in ./actionBlocksKey (imported directly by chart blocks/tests too) to avoid a\n// circular import between this module and the chart blocks — see that file for details.\nimport { actionBlocksKey } from './actionBlocksKey'\n\n// Drilldown indexes are not passed down: action blocks read them from\n// InsightsV2Store (useInsightsV2Store().actionDrawer).\nexport interface ActionBlockProps {\n beat: Beat\n}\n\nconst noop = (_: ActionBlockProps) => {}\n\n// Re-exported so existing `hasDrawerBlock` imports from this module keep working.\nexport { hasDrawerBlock } from './hasDrawerBlock'\n\nexport interface ActionBlockEntry {\n Component: React.ComponentType<ActionBlockProps>\n usePrepare: (props: ActionBlockProps) => void // required; default to noop in each entry\n // Resolves the drawer title from the clicked CTA's variant + copy, with the beat available\n // for blocks that title from beat fields (e.g. transaction-list reads insights_payload.title).\n // Falls back to the CTA label when the resolver returns an empty string / is absent.\n title?: (variant: string | null | undefined, copy: GlobalCopy, beat?: Beat) => string\n // 'drawer' (default) or 'modal' (component renders its own dialog, no Drawer wrapper).\n presentation?: 'drawer' | 'modal'\n}\n\n// Registry of drawer drilldowns, keyed by the `block` name the backend sends Add\n// `usePrepare` when the block needs to load data before rendering.\n\n/**\n * A registry entry whose fields read their imports when used, not when this module loads. Some\n * registered blocks render `TransactionDetails`, whose embedded card mounts `ActionBlockLayer`,\n * which imports this registry: when one of those blocks loads first, its own import is not\n * initialised yet while this module evaluates, so a value copied at load would be `undefined`\n * (or throw under native ES modules). Reading on access sees the finished import.\n */\nconst liveEntry = (resolve: () => ActionBlockEntry): ActionBlockEntry => ({\n get Component() {\n return resolve().Component\n },\n get usePrepare() {\n return resolve().usePrepare\n },\n get title() {\n return resolve().title\n },\n get presentation() {\n return resolve().presentation\n },\n})\n\nexport const actionBlocks = {\n [actionBlocksKey.PLACEHOLDER_ACTION_BLOCK]: liveEntry(() => ({\n Component: PlaceholderActionBlock,\n usePrepare: noop,\n title: () => 'Action Block Layer Drilldown',\n })),\n [actionBlocksKey.MAKE_TRANSFER_ACTION_BLOCK]: liveEntry(() => ({\n Component: MakeTransferActionBlockLayer,\n usePrepare: noop,\n title: getMakeTransferDrawerTitle,\n })),\n [actionBlocksKey.TRANSCATION_HISTORY_ACTION_BLOCK]: liveEntry(() => ({\n Component: TransactionHistoryBlock,\n usePrepare: noop,\n title: getDrawerHeaderTitle,\n })),\n [actionBlocksKey.TRANSACTION_DETAILS_ACTION_BLOCK]: liveEntry(() => ({\n Component: TransactionDetailsBlock,\n usePrepare: useTransactionDetailsPrepare,\n title: () => 'Transaction Details',\n })),\n // Expense Details for one recurring subscription. Which subscription a beat names is resolved in\n // `RecurringTransactionBlock/subscriptionBeats.ts`, not through this registry.\n [actionBlocksKey.RECURRING_TRANSACTION_ACTION_BLOCK]: liveEntry(() => ({\n Component: RecurringTransactionBlock,\n usePrepare: useRecurringTransactionPrepare,\n title: (_variant, copy) => copy.recurring?.expense_details ?? '',\n })),\n // Remaining Cash for the Payday Cash Left Over Status beat. Store-driven: reuses the recurring\n // loader, which also loads accounts and categories, so CashflowStore's computeds are ready.\n [actionBlocksKey.REMAINING_CASH_ACTION_BLOCK]: liveEntry(() => ({\n Component: RemainingCashBlock,\n usePrepare: useRecurringTransactionPrepare,\n title: (_variant, copy) => copy.insights_feed?.remaining_cash?.title ?? '',\n })),\n // The block renders its own drawer (the help module's RequestSupport) on top of the action\n // drawer, so the action drawer's title is the CTA label.\n [actionBlocksKey.CONTACT_SUPPORT_ACTION_BLOCK]: liveEntry(() => ({\n Component: ContactSupportActionBlock,\n usePrepare: noop,\n title: (_variant, copy) => copy.help?.request_support ?? '',\n })),\n [actionBlocksKey.FEEDBACK_MODAL_ACTION_BLOCK]: liveEntry(() => ({\n Component: FeedbackModalActionBlock,\n usePrepare: noop,\n presentation: 'modal',\n })),\n [actionBlocksKey.CONNECTION_DETAIL_ACTION_BLOCK]: liveEntry(() => ({\n Component: ConnectionDetailActionBlock,\n usePrepare: noop,\n title: (_variant, copy) =>\n copy.insights_feed?.connection_details?.connection_details_drawer_title ?? '',\n })),\n // Boots MX's Connect widget (web-widget-sdk iframe) inside the action\n // drawer; the drawer title falls back to the CTA label.\n [actionBlocksKey.CONNECT_WIDGET_ACTION_BLOCK]: liveEntry(() => ({\n Component: ConnectWidgetActionBlock,\n usePrepare: noop,\n })),\n [actionBlocksKey.SURVEY_MODAL_ACTION_BLOCK]: liveEntry(() => ({\n Component: SurveyModalActionBlock,\n usePrepare: noop,\n presentation: 'modal',\n })),\n [actionBlocksKey.TRANSACTION_LIST_ACTION_BLOCK]: liveEntry(() => ({\n Component: TransactionListBlock,\n usePrepare: useTransactionDetailsPrepare,\n title: (_variant, _copy, beat) => beat?.insights_payload?.title ?? '',\n })),\n // One whole-dollar setting in a dialog; the CTA variant picks which (low-balance threshold or\n // safety net). A modal: no drawer, so no drawer title.\n [actionBlocksKey.AMOUNT_INPUT_MODAL_ACTION_BLOCK]: liveEntry(() => ({\n Component: AmountInputModalBlock,\n presentation: 'modal',\n // Loads inside the block: it mounts only while open, so mounting is the open-time load.\n usePrepare: noop,\n })),\n [actionBlocksKey.EMERGENCY_SAVINGS_ACTION_BLOCK]: liveEntry(() => ({\n Component: EmergencySavingsBlock,\n usePrepare: noop,\n title: (_variant, _copy, beat) => beat?.insights_payload?.title ?? '',\n })),\n // Monthly Credit Card Interest Summary's \"Learn how to save\": the credit card payoff calculator.\n [actionBlocksKey.PAYOFF_CALCULATOR_ACTION_BLOCK]: liveEntry(() => ({\n Component: PayoffCalculatorBlock,\n usePrepare: usePayoffCalculatorPrepare,\n title: (_variant, copy) => copy.insights_feed?.payoff_calculator?.title ?? '',\n })),\n} as Record<string, ActionBlockEntry>\n\nexport const blocks = {\n account_block: AccountBlock,\n account_switch_block: AccountSwitchBlock,\n direct_deposit_block: DetailedAccountBlock,\n bar_chart_block: BarchartBlock,\n budget_block: BudgetBlock,\n debts_block: DebtsBlock,\n donut_chart_block: DonutChartBlock,\n double_bar_chart_block: DoubleBarChartBlock,\n double_progress_bar_block: DoubleProgressBarBlock,\n goals_block: GoalsBlock,\n image_block: ImageBlock,\n no_spend_days_block: NoSpendDaysBlock,\n repeating_transaction_block: RepeatingTransactionBlock,\n save_extra_block: SaveExtraBlock,\n savings_opportunity_block: SavingsOpportunityBlock,\n step_chart_block: StepChartBlock,\n svg_image_block: SVGImageBlock,\n upcoming_bill_block: RepeatingTransactionBlock,\n upcoming_subscription_block: UpcomingSubscriptionBlock,\n withdrawal_block: WithdrawalBlock,\n transaction_block: TransactionBlock,\n} as Record<string, React.ComponentType<{ payload: InsightsPayload; beatGuid?: string }>>\n"],"mappings":"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"}
|
|
1
|
+
{"version":3,"file":"blocks.es.js","names":[],"sources":["../../../src/insights-v2/mappings/blocks.ts"],"sourcesContent":["import {\n AccountBlock,\n AccountSwitchBlock,\n BarchartBlock,\n BudgetBlock,\n DebtsBlock,\n DetailedAccountBlock,\n DonutChartBlock,\n GoalsBlock,\n DoubleBarChartBlock,\n DoubleProgressBarBlock,\n NoSpendDaysBlock,\n RepeatingTransactionBlock,\n SaveExtraBlock,\n SavingsOpportunityBlock,\n SVGImageBlock,\n UpcomingSubscriptionBlock,\n WithdrawalBlock,\n TransactionBlock,\n} from '../blocks'\nimport StepChartBlock from '../blocks/ChartBlocks/StepChartBlock'\nimport ImageBlock from '../blocks/ImageBlocks/ImageBlock'\n\nimport type { Beat, GlobalCopy, InsightsPayload } from '../../core'\nimport { ContactSupportActionBlock } from '../actionBlocks/ContactSupportActionBlock'\nimport { FeedbackModalActionBlock } from '../actionBlocks/FeedbackModalActionBlock'\nimport { ConnectionDetailActionBlock } from '../actionBlocks/ConnectionDetailActionBlock'\nimport { ConnectWidgetActionBlock } from '../actionBlocks/ConnectWidgetActionBlock'\nimport { SurveyModalActionBlock } from '../actionBlocks/SurveyModalActionBlock'\nimport { PlaceholderActionBlock } from '../actionBlocks/PlaceholderActionBlock'\nimport { MakeTransferActionBlockLayer } from '../actionBlocks/MakeTransferActionBlock/MakeTransferActionBlockLayer'\nimport { getMakeTransferDrawerTitle } from '../actionBlocks/MakeTransferActionBlock/layout'\nimport { TransactionHistoryBlock } from '../actionBlocks/TransactionHistoryBlock/TransactionHistoryBlock'\nimport { getDrawerHeaderTitle } from '../actionBlocks/TransactionHistoryBlock/utils'\nimport {\n TransactionDetailsBlock,\n useTransactionDetailsPrepare,\n} from '../actionBlocks/TransactionDetailsBlock'\nimport {\n RecurringTransactionBlock,\n useRecurringTransactionPrepare,\n} from '../actionBlocks/RecurringTransactionBlock'\nimport { TransactionListBlock } from '../actionBlocks/TransactionListBlock'\nimport { RemainingCashBlock } from '../actionBlocks/RemainingCashBlock'\nimport { AmountInputModalBlock } from '../actionBlocks/AmountInputModalBlock'\nimport { EmergencySavingsBlock } from '../actionBlocks/EmergencySavingsBlock'\nimport {\n CreditUtilizationBlock,\n useCreditUtilizationPrepare,\n} from '../actionBlocks/CreditUtilizationBlock'\nimport {\n PayoffCalculatorBlock,\n usePayoffCalculatorPrepare,\n} from '../actionBlocks/PayoffCalculatorBlock'\n// Keys live in ./actionBlocksKey (imported directly by chart blocks/tests too) to avoid a\n// circular import between this module and the chart blocks — see that file for details.\nimport { actionBlocksKey } from './actionBlocksKey'\n\n// Drilldown indexes are not passed down: action blocks read them from\n// InsightsV2Store (useInsightsV2Store().actionDrawer).\nexport interface ActionBlockProps {\n beat: Beat\n}\n\nconst noop = (_: ActionBlockProps) => {}\n\n// Re-exported so existing `hasDrawerBlock` imports from this module keep working.\nexport { hasDrawerBlock } from './hasDrawerBlock'\n\nexport interface ActionBlockEntry {\n Component: React.ComponentType<ActionBlockProps>\n usePrepare: (props: ActionBlockProps) => void // required; default to noop in each entry\n // Resolves the drawer title from the clicked CTA's variant + copy, with the beat available\n // for blocks that title from beat fields (e.g. transaction-list reads insights_payload.title).\n // Falls back to the CTA label when the resolver returns an empty string / is absent.\n title?: (variant: string | null | undefined, copy: GlobalCopy, beat?: Beat) => string\n // 'drawer' (default) or 'modal' (component renders its own dialog, no Drawer wrapper).\n presentation?: 'drawer' | 'modal'\n}\n\n// Registry of drawer drilldowns, keyed by the `block` name the backend sends Add\n// `usePrepare` when the block needs to load data before rendering.\n\n/**\n * A registry entry whose fields read their imports when used, not when this module loads. Some\n * registered blocks render `TransactionDetails`, whose embedded card mounts `ActionBlockLayer`,\n * which imports this registry: when one of those blocks loads first, its own import is not\n * initialised yet while this module evaluates, so a value copied at load would be `undefined`\n * (or throw under native ES modules). Reading on access sees the finished import.\n */\nconst liveEntry = (resolve: () => ActionBlockEntry): ActionBlockEntry => ({\n get Component() {\n return resolve().Component\n },\n get usePrepare() {\n return resolve().usePrepare\n },\n get title() {\n return resolve().title\n },\n get presentation() {\n return resolve().presentation\n },\n})\n\nexport const actionBlocks = {\n [actionBlocksKey.PLACEHOLDER_ACTION_BLOCK]: liveEntry(() => ({\n Component: PlaceholderActionBlock,\n usePrepare: noop,\n title: () => 'Action Block Layer Drilldown',\n })),\n [actionBlocksKey.MAKE_TRANSFER_ACTION_BLOCK]: liveEntry(() => ({\n Component: MakeTransferActionBlockLayer,\n usePrepare: noop,\n title: getMakeTransferDrawerTitle,\n })),\n [actionBlocksKey.TRANSCATION_HISTORY_ACTION_BLOCK]: liveEntry(() => ({\n Component: TransactionHistoryBlock,\n usePrepare: noop,\n title: getDrawerHeaderTitle,\n })),\n [actionBlocksKey.TRANSACTION_DETAILS_ACTION_BLOCK]: liveEntry(() => ({\n Component: TransactionDetailsBlock,\n usePrepare: useTransactionDetailsPrepare,\n title: () => 'Transaction Details',\n })),\n // Expense Details for one recurring subscription. Which subscription a beat names is resolved in\n // `RecurringTransactionBlock/subscriptionBeats.ts`, not through this registry.\n [actionBlocksKey.RECURRING_TRANSACTION_ACTION_BLOCK]: liveEntry(() => ({\n Component: RecurringTransactionBlock,\n usePrepare: useRecurringTransactionPrepare,\n title: (_variant, copy) => copy.recurring?.expense_details ?? '',\n })),\n // Remaining Cash for the Payday Cash Left Over Status beat. Store-driven: reuses the recurring\n // loader, which also loads accounts and categories, so CashflowStore's computeds are ready.\n [actionBlocksKey.REMAINING_CASH_ACTION_BLOCK]: liveEntry(() => ({\n Component: RemainingCashBlock,\n usePrepare: useRecurringTransactionPrepare,\n title: (_variant, copy) => copy.insights_feed?.remaining_cash?.title ?? '',\n })),\n // The block renders its own drawer (the help module's RequestSupport) on top of the action\n // drawer, so the action drawer's title is the CTA label.\n [actionBlocksKey.CONTACT_SUPPORT_ACTION_BLOCK]: liveEntry(() => ({\n Component: ContactSupportActionBlock,\n usePrepare: noop,\n title: (_variant, copy) => copy.help?.request_support ?? '',\n })),\n [actionBlocksKey.FEEDBACK_MODAL_ACTION_BLOCK]: liveEntry(() => ({\n Component: FeedbackModalActionBlock,\n usePrepare: noop,\n presentation: 'modal',\n })),\n [actionBlocksKey.CONNECTION_DETAIL_ACTION_BLOCK]: liveEntry(() => ({\n Component: ConnectionDetailActionBlock,\n usePrepare: noop,\n title: (_variant, copy) =>\n copy.insights_feed?.connection_details?.connection_details_drawer_title ?? '',\n })),\n // Boots MX's Connect widget (web-widget-sdk iframe) inside the action\n // drawer; the drawer title falls back to the CTA label.\n [actionBlocksKey.CONNECT_WIDGET_ACTION_BLOCK]: liveEntry(() => ({\n Component: ConnectWidgetActionBlock,\n usePrepare: noop,\n })),\n [actionBlocksKey.SURVEY_MODAL_ACTION_BLOCK]: liveEntry(() => ({\n Component: SurveyModalActionBlock,\n usePrepare: noop,\n presentation: 'modal',\n })),\n [actionBlocksKey.TRANSACTION_LIST_ACTION_BLOCK]: liveEntry(() => ({\n Component: TransactionListBlock,\n usePrepare: useTransactionDetailsPrepare,\n title: (_variant, _copy, beat) => beat?.insights_payload?.title ?? '',\n })),\n // One whole-dollar setting in a dialog; the CTA variant picks which (low-balance threshold or\n // safety net). A modal: no drawer, so no drawer title.\n [actionBlocksKey.AMOUNT_INPUT_MODAL_ACTION_BLOCK]: liveEntry(() => ({\n Component: AmountInputModalBlock,\n presentation: 'modal',\n // Loads inside the block: it mounts only while open, so mounting is the open-time load.\n usePrepare: noop,\n })),\n // Credit Utilization's \"Learn more\": donut summary, legend and the per-card list. Loads accounts\n // for the institution logos; the rows themselves ride on the beat.\n [actionBlocksKey.CREDIT_UTILIZATION_ACTION_BLOCK]: liveEntry(() => ({\n Component: CreditUtilizationBlock,\n usePrepare: useCreditUtilizationPrepare,\n title: (_variant, copy) => copy.insights_feed?.credit_utilization?.title ?? '',\n })),\n [actionBlocksKey.EMERGENCY_SAVINGS_ACTION_BLOCK]: liveEntry(() => ({\n Component: EmergencySavingsBlock,\n usePrepare: noop,\n title: (_variant, _copy, beat) => beat?.insights_payload?.title ?? '',\n })),\n // Monthly Credit Card Interest Summary's \"Learn how to save\": the credit card payoff calculator.\n [actionBlocksKey.PAYOFF_CALCULATOR_ACTION_BLOCK]: liveEntry(() => ({\n Component: PayoffCalculatorBlock,\n usePrepare: usePayoffCalculatorPrepare,\n title: (_variant, copy) => copy.insights_feed?.payoff_calculator?.title ?? '',\n })),\n} as Record<string, ActionBlockEntry>\n\nexport const blocks = {\n account_block: AccountBlock,\n account_switch_block: AccountSwitchBlock,\n direct_deposit_block: DetailedAccountBlock,\n bar_chart_block: BarchartBlock,\n budget_block: BudgetBlock,\n debts_block: DebtsBlock,\n donut_chart_block: DonutChartBlock,\n double_bar_chart_block: DoubleBarChartBlock,\n double_progress_bar_block: DoubleProgressBarBlock,\n goals_block: GoalsBlock,\n image_block: ImageBlock,\n no_spend_days_block: NoSpendDaysBlock,\n repeating_transaction_block: RepeatingTransactionBlock,\n save_extra_block: SaveExtraBlock,\n savings_opportunity_block: SavingsOpportunityBlock,\n step_chart_block: StepChartBlock,\n svg_image_block: SVGImageBlock,\n upcoming_bill_block: RepeatingTransactionBlock,\n upcoming_subscription_block: UpcomingSubscriptionBlock,\n withdrawal_block: WithdrawalBlock,\n transaction_block: TransactionBlock,\n} as Record<string, React.ComponentType<{ payload: InsightsPayload; beatGuid?: string }>>\n"],"mappings":"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"}
|